My Tool Studio
Text

Text Compare (Diff Checker)

Paste an older and a newer version of a text, or open two .txt or code files, and this text compare tool highlights every difference as you type. The side-by-side view puts the original on the left and the changed version on the right with line numbers, changed lines tinted and the exact words inside them marked. Switch to a unified view, like git diff, or an inline view with additions in green and removals in red. You can ignore case and whitespace changes, hide unchanged lines, jump from change to change, and copy a change from one side to the other to merge the two versions. The result can be saved as a .diff patch. It runs in your browser, so contracts and code are never uploaded.

Always freeNo sign upRuns in your browser
View
+4 lines added-4 lines removed2 changes
1Shipping policy1Shipping policy
22
Change 1: lines 3-6 to 3-5
3Orders placed before 2 pm ship the same day.3Orders placed before 4 pm ship the same day.
4Standard delivery takes 3 to 5 working days.4Standard delivery takes 2 to 4 working days.
5We ship to India, the UK and the US.5We ship to India, the UK, the US and Canada.
6Returns are accepted within 14 days.
7Contact support@example.com with questions.6Contact support@example.com with questions.
Change 2: lines none to 7-7
7Express delivery is available at checkout.

Use original copies the left lines of a change over the right text. Use changed does the reverse. Both text boxes update, so you can copy the merged result.

How to use

01

Add both versions

Paste the earlier text in Original and the newer one in Changed, or press Open file on either side, or drop a .txt, .md, .csv or code file onto a box. A short sample loads when the page opens.

02

Pick a view and options

Choose Side by side, Unified or Inline. Set Highlight inside lines by to Word or Character, and tick Ignore case, Ignore whitespace changes or Hide unchanged lines as needed.

03

Review, merge and save

Use Prev and Next to jump between changes. Click Use original or Use changed on a change to copy it across, then copy either box, or save the differences with the .diff button.

Why Text Compare (Diff Checker)

When a text compare tool helps

A diff is useful whenever two versions of the same text exist and nobody tracked what changed. Paste both, or open both files, and the differences are marked in seconds without installing anything.

  • Contracts and agreements: see which words changed in a draft returned without tracked changes. Side by side with word highlighting works well here.
  • Code and config files: compare two versions of a function or a settings file in the unified view, and tick Ignore whitespace changes so re-indented lines do not hide the real edits.
  • Essays and articles: check what an editor changed, then use Use original to restore a sentence you want to keep.
  • SEO copy: compare the live title, meta description or product text with a proposed rewrite before publishing.
  • Data: spot a changed digit in an ID list or a price table with Highlight inside lines by Character.

Which view to use

All three views read the same comparison, so you can switch at any time without losing anything.

ViewGood forWhat you see
Side by sideReviewing edits to prose or codeTwo columns with line numbers, changed lines tinted, changed words marked
UnifiedCode review and sharing a patchOne column, removed lines with a minus, added lines with a plus
InlineShort texts and single paragraphsThe text once, additions in green, removals in red with strike-through

Common questions

What is the difference between side-by-side and unified diff views?
Side by side shows the two versions in two columns, so you can read each one as it is. Unified shows one column where removed lines start with a minus and added lines with a plus, the same layout as git diff and code review tools. Inline shows the text once with changes marked in place, which suits prose.
How does the text compare tool decide what changed?
It finds the smallest set of lines to add and remove that turns the original into the changed text, using the Myers diff method that git also uses. Changed lines are then paired and compared word by word or character by character, so you see exactly which words moved inside a line.
Can the diff checker ignore whitespace and capital letters?
Yes. Tick Ignore whitespace changes and lines that differ only in spaces, tabs or indentation count as the same. Tick Ignore case and Hello and hello match. Also ignore text matching takes a regular expression, with presets for times, dates, numbers and UUIDs, so log lines that differ only by a timestamp count as the same line. The text itself is always shown as it is.
How do I merge changes from one text into the other?
In the side-by-side or unified view, each change has a small bar with Use original and Use changed. Use original copies the left lines over the matching lines on the right, and Use changed does the reverse. The text boxes update, so after a few clicks you can copy the merged version.
Can I compare two text files instead of pasting?
Yes. Press Open file above either box, or drag a file onto it. Plain text, Markdown, CSV, JSON, logs and common code files work, up to 20 MB each. Word documents and PDFs are not text files, so copy their text out and paste it instead.
What does Hide unchanged lines do in the text diff?
It folds long runs of identical lines into a single row that says how many lines are hidden, keeping three lines of context around each change. That makes a small edit in a long file easy to find. Click Show all to unfold everything again.
Can I save the differences as a patch file?
Yes. Press .diff to download a unified diff with the usual --- and +++ headers and @@ line ranges, or Copy diff to put it on the clipboard. The patch is built from the file names when you opened files, or from original.txt and changed.txt otherwise.
What happens when I compare two very long texts?
Long files are compared line by line first, which stays fast even with many thousands of lines. If two texts are so different that the browser cannot compare them in reasonable time, they are shown as one replaced block with a message suggesting smaller sections.
Can I compare two texts without uploading them anywhere?
Yes. The comparison runs with JavaScript in your browser, and files you open are read on your device. Nothing is sent to a server, which matters for contracts, offer letters, unreleased copy and source code.

More Text tools

View all