Text Diff Checker
Differences between the two texts
How to compare two texts
Paste the original text on the left and the modified text on the right. The result lists every line with its line numbers on both sides: lines starting with − were removed, lines starting with + were added, and the header shows the added and removed counts and the similarity percentage.
Pick Line, Word or Char granularity depending on what changed, and use Options to ignore whitespace, line endings, case or lines that match a regular expression. Swap exchanges the two sides; Copy diff copies the result with +/− prefixes.
Diff checker FAQ
Are my comparisons saved or shared?
The last 5 comparisons are kept in this browser's localStorage, where you can clear them. If you turn on Share via URL, both texts are encoded into the part of the URL after #, so anyone you send the link to can read them.
How does the diff checker find the differences?
It uses the Myers diff algorithm (Eugene W. Myers, 1986), which is also Git's default. It finds the shortest edit script: the fewest deletions and insertions that turn the original into the modified text. Runs of deletions followed by insertions are paired up and shown as changed lines. The percentage next to the +/− counts is the share of unchanged lines, where a changed line counts once on each side.
Should I compare by line, word or character?
Use Line for code, config files and logs; it matches what git diff shows. Use Word for contracts and prose, where one edited word should not mark the whole sentence as changed. Words are runs of letters, digits and underscores; spaces and punctuation are separate tokens. Use Char to find single-character edits such as typos or a changed digit in an ID.
How do I ignore whitespace, case or timestamps in a diff?
Open Options. You can ignore all whitespace, only leading or trailing whitespace, CRLF vs LF line endings, tabs vs spaces (a tab counts as 4 spaces) and letter case. For values that always change, add a JavaScript regular expression per line under Ignore patterns: at line granularity, ^Last updated:.*$ treats every line starting with "Last updated:" as equal on both sides.
Can I compare two files?
Yes, text files. Upload loads a file of up to 5 MB into either side, including .txt, .md, .csv, .json, .yaml, .xml, .html, .log and .env files and source code such as .js, .ts, .py, .java, .go or .sql. Word documents, PDFs and images are not supported; copy their text and paste it instead.
How large can the texts be?
There is no fixed line limit; very large inputs take longer because the work grows with the number of differences. Character granularity switches to word granularity when a side is longer than 5,000 characters, and the page shows a notice when that happens. Share via URL stops updating the link once the encoded texts exceed 8,000 characters.
Can I export the diff as a patch file?
Yes. Copy as Git patch or Download .patch produces a unified diff with --- a/original and +++ b/modified headers, @@ hunk headers and 3 lines of context. Export at line granularity, since word and character diffs do not map to patch lines. Before applying it to a file, run git apply --check to confirm it applies cleanly. You can also copy the diff as a Markdown table or as HTML.
Related tools
Related articles
- Six Edge Cases Most CSV-to-JSON Converters Get Wrong
From RFC 4180 quote escapes to type inference corrupting IDs, here are the CSV ↔ JSON conversion pitfalls you only notice once they hit production.