Skip to content

Text Diff. Every change, line by line.

Runs entirely in your browser, nothing is uploaded anywhere.

A diff you can trust, with no upload

Text Diff compares your two texts line by line using a longest-common-subsequence algorithm, the same core idea behind git diff. Lines only in the original are marked as removed (red); lines only in the changed version are marked as added (green); everything else lines up untouched with its real line numbers on both sides. Toggle Unified for a single stacked column or Side by side for two aligned panes, and switch on ignore-case or ignore-whitespace when trailing spaces or capitalisation shouldn't count as a change. Because the whole comparison runs in your browser, your content never leaves your device, good for code, config, contracts, essays or anything else you'd rather not paste into a server.

§ · written guide

How to use Text Diff

Text Diff compares two versions of a text line by line and shows which lines were added, removed or left alone. It finds the longest run of lines the two versions share, the same idea git diff uses, and marks everything else as a change. It is for checking edits to code, config files, contracts, essays or any text where you need to see exactly what changed.

Step by step

  1. Paste both versions

    Paste the older text into Original and the newer text into Changed. To see how the tool works first, press Load sample, which fills both boxes and runs a comparison.

  2. Choose what to ignore

    Tick Ignore case if capital letters should not count as a change. Tick Ignore whitespace to treat runs of spaces and tabs as one space and to ignore spaces at the start and end of each line. Both are off at first.

  3. Pick a view

    Choose Unified for one column, like a Git patch, or Side by side for the two versions in aligned panes. Unified is selected first, and switching views redraws the result straight away.

  4. Run the comparison

    Press Compare. The result appears below with counts of added, removed and unchanged lines. If the texts match, a message says the two texts are identical.

  5. Flip or start over

    Press Swap to exchange the two boxes and compare in the other direction, so additions become removals. Press Clear to empty both boxes and hide the result.

Reading the result

  • Green lines marked + exist only in Changed. Red lines marked with a minus sign exist only in Original. Unmarked lines are in both.
  • The two number columns show each line's position in Original and in Changed. In Side by side, a hatched empty cell means the line has no partner on that side.
  • A line that was edited shows up as one removed line followed by one added line. The tool compares whole lines, it does not highlight the changed words inside them.
  • With the sample loaded the summary reads +3 added, 2 removed and 2 unchanged: two lines were reworded, one line was added at the end, and the first and last original lines are untouched.

Tips and common mistakes

  • Press Compare again after ticking Ignore case or Ignore whitespace. The options apply on the next comparison, while switching the view updates at once.
  • If nearly every line shows as changed, the two texts probably differ in indentation or line endings, for example a file saved on Windows against one saved on a Mac. Tick Ignore whitespace and compare again.
  • The ignore options only affect how lines are matched. The result always shows your text exactly as you pasted it.
  • Very long texts, thousands of lines in each box, can be slow or stall the tab, because the comparison builds a table as large as the two line counts multiplied together. Compare one section at a time if that happens.

Privacy and limits

The comparison runs entirely in your browser and works offline once the page has loaded. Neither text is uploaded or saved, so reloading the page clears both boxes.

Back to the tool

§ 02 · what you can do

Everything a diff should do.

  • Compare any two texts line by line, code, config, documents, essays or plain notes, with every change highlighted.
  • Read it your way in a stacked unified view or two aligned side-by-side panes, switchable any time.
  • Spot additions and deletions instantly: green for added lines, red for removed, with real line numbers on both sides.
  • Ignore case or whitespace so capitalisation or trailing spaces don't get flagged as real changes.
  • Swap Original and Changed in one click to reverse the comparison direction and re-run instantly.
  • Private by construction: the diff runs entirely in your browser, nothing is uploaded and it keeps working offline.
§ 04 · faq

Frequently asked questions.

Is Text Diff free?
Yes, completely free for everyone. No sign-up, no account and no usage limits.
Is it private? Is my text uploaded anywhere?
No upload, ever. The whole comparison runs in your browser on your own device, your two texts never leave your computer and nothing is sent to a server.
What is the difference between Unified and Side by side?
Unified stacks everything into one column, added lines with a +, removed lines with a −, like a Git patch. Side by side shows the original and changed text in two aligned panes so you can read matching lines across from each other. Both use the same diff underneath.
What do Ignore case and Ignore whitespace do?
Ignore case treats Hello and hello as the same line. Ignore whitespace collapses runs of spaces and tabs and trims the ends, so re-indented or space-padded lines don't count as changes. Both affect only how lines are matched, the original text is still shown exactly as you pasted it.
Does it work offline?
Yes, once the page has loaded, comparing works without a connection because all the logic runs locally in your browser.
Can it compare code or JSON?
Yes. It's a plain-text, line-based diff, so it works on source code, JSON, YAML, config files, Markdown or ordinary prose. It compares whole lines rather than parsing syntax, which keeps it fast and language-agnostic.

Published · Last updated .

Priya sent you a message Online now

Talk to a Developer Now

Share your name and email to reply.

Reply