Skip to main content

Text Compare

Compare two blocks of text and see line-by-line differences highlighted. Find what changed between two documents, emails or lists, right in your browser.

Original

Stays in your browser

Changed

Stays in your browser

Shortcuts: Ctrl+Enter run · Ctrl+Shift+C copy result · / search (use ⌘ on Mac)

Next steps

Done here? Use the Send to… menu on the result to carry it on to Regex Tester.

Online Text Compare & Diff Checker

Spot differences between two versions of any plain text — log output from before and after a bug fix, two drafts of a document, or two revisions of a code snippet — with a line-by-line diff view showing exactly what was added or removed, no JSON structure required. Comparing code? Use the Code Diff Checker. Comparing JSON? Use JSON Compare, which ignores key order and spacing. It is useful for reviewing config changes, documentation revisions, and generated output where a line-by-line text diff is clearer than manual scanning.

How to compare two blocks of text online

Paste the original text into the left box and the changed version into the right box, then click Compare. The tool runs a line-by-line diff and shows exactly which lines were added, removed, or left unchanged — no special format required, unlike a JSON- or code-aware diff tool.

Reading the diff result

Lines marked with a + were added in the changed version; lines marked with a - were present in the original but removed. A running total of additions and removals appears above the diff view, and unchanged lines are shown for context so you can see where in the document a change occurred.

Common use cases

  • Comparing log output captured before and after a bug fix to confirm the behavior actually changed
  • Reviewing two drafts of documentation or an email before sending
  • Diffing plain-text config files that aren't valid JSON or XML
  • Spotting exactly what changed between two pasted code snippets without opening a full diff tool

Everything runs locally in your browser — neither block of text is ever uploaded to a server.

Worked example

Original Hello world Goodbye against changed Hello world See you later shows the first line unchanged and the second as a removed/added pair. Changing only the indentation of a line shows as a removed/added pair unless you set Whitespace to ignore it, in which case the line counts as unchanged. Inside a changed pair, the words that differ are marked more strongly (or single characters, if you pick that).

Common mistakes and edge cases

  • With Whitespace set to compare exactly, a pure reindent or a trailing space shows as a full change. Switch the option to ignore it.
  • Ignoring blank lines leaves them out of the result completely, so line numbers still match your text but blank lines do not appear.
  • Merge view: switch it on, click Compare, then choose Use left, Use right or Use both for each change. A change you have not chosen yet uses the left side. Blank lines are never ignored while merging, so the merged text keeps all of them. Where two lines differ only in spaces or capitals and you chose to ignore that, the merged text keeps the left version.

Frequently asked questions

Does this text compare tool work on plain text, not just code?
Yes — it works on any plain text: log output, documentation drafts, emails, config files, or code. There's no requirement for the input to be valid JSON or any particular format.
Is my text uploaded anywhere when I compare it?
No. The comparison runs entirely in your browser using a local line-diff algorithm — neither side is ever sent to a server.
What counts as a "line" for the diff?
Each line is split on newline characters, exactly as your text is laid out. Reordering or wrapping text differently between the two versions will show as changed lines, since the comparison works line by line, not word by word.
Is there a size limit on how much text I can compare?
Up to 50,000 lines per side. Texts that are very different from each other can be slower than similar ones.
Does it ignore whitespace-only differences, like a reindent?
Yes, if you choose it. Set Whitespace to "Ignore start and end" to skip indentation and trailing spaces, or "Ignore all" to skip every whitespace difference. You can also ignore upper and lower case and blank lines.
What is the easiest way to find differences between two texts?
Paste the original text on the left and the changed text on the right. Added lines are marked in one colour, removed lines in another, and unchanged lines stay plain, so you can see what moved at a glance. For JSON or other structured data, JSON Compare is the better choice because it ignores formatting changes.

Related tools

More Formatters & Parsers

View all Formatters & Parsers tools →