Diff Checker
Compare two versions of a text and see what was added, removed or changed.
To compare two texts, paste the original into the Input box and the new version into the Changed text box, then click Compare; removed lines are marked with a leading "- " and added lines with "+ ", with totals for each. You can compare by lines, words or characters and ignore whitespace. Both texts stay in your browser.
How do I compare two texts to find the differences?
- Paste the original version into the Input box.
- Paste the new version into the Changed text box.
- Choose Compare by: Lines for documents and code, Words for prose edits, Characters for small typo-level changes.
- Tick Ignore whitespace changes to skip differences in spaces, tabs and indentation.
- Click Compare and read the output: removed content starts with "- ", added content with "+ ", and the counts of additions and removals are shown.
- Click Copy output to paste the diff into an email, ticket or review comment.
The diff checker runs a standard longest-common-subsequence comparison, the same approach behind git diff and the track changes view in Word, and reports only what differs. Unchanged content is left unmarked, removed content gets a leading "- " and added content a leading "+ ", so a line that was edited shows as one removal followed by one addition. The counts of additions and removals give you a quick sense of how big the change is before you read it.
Compare by decides the unit of comparison. Lines is the right choice for code, CSV exports, configuration files and anything where each line is a record; it is also fastest on long inputs. Words suits prose, because a single reworded sentence shows as a few changed words rather than a whole replaced paragraph. Characters is the most precise and is useful for spotting a changed digit in a reference number, a swapped letter in a name or a stray full stop, but on long texts the output becomes noisy.
Ignore whitespace changes treats runs of spaces and tabs as equivalent and ignores leading and trailing space on each line, so reformatting, re-indenting and different line endings do not show up as changes. It is what you want when comparing a file saved on Windows with one saved on a Mac, or a document pasted from two different editors.
Typical jobs: checking what a colleague changed in a contract clause, confirming a supplier's revised terms match what was agreed, comparing two exports of the same report, reviewing edits to a web page's copy, or seeing exactly what a find-and-replace did. Both texts stay inside your browser tab as plain JavaScript, never transmitted or stored, so confidential drafts and legal documents are safe to compare. Texts of several thousand lines compare in well under a second. If you need JSON compared, run both versions through the JSON Formatter with Sort keys on first so key order does not create false differences.
How it works: this tool uses plain JavaScript running in your browser tab. No server is involved, so Kilnfile never sees your file. Last reviewed 20 September 2026.
Frequently asked questions
Which box is the original and which is the new version?
The Input box at the top is the original and the Changed text box below it is the new version. Removed lines, marked "- ", are things that were in the original but not the new text; added lines, marked "+ ", are the reverse. Swap them if the signs look backwards.
Can I compare two files rather than pasted text?
Open each file in a text editor, copy the contents and paste them into the two boxes. Word documents can be pasted as text, though formatting is not compared. For PDFs, run each through the PDF to Text tool first and compare the results.
Why does everything show as changed?
Usually line endings or indentation differ between the two versions, or one has been re-wrapped at a different width. Tick Ignore whitespace changes and, for prose, switch Compare by to Words so that re-wrapped paragraphs match on content rather than line breaks.
Does it work for code and JSON?
Yes. Use Lines for code. For JSON, first run both versions through the JSON Formatter with the same indentation and Sort keys alphabetically ticked, otherwise differences in key order and spacing will swamp the real changes.
Are the texts I compare kept anywhere?
No. The comparison runs inside your browser tab and neither text is uploaded or stored. There is no account and no size limit beyond what your browser can handle comfortably.
Cite this page: “Diff Checker: Compare Two Texts and See Every Change”, Kilnfile, https://kilnfile.com/text/diff-checker/
Related tools
Guides
- How to format and validate JSONPretty-print, minify and check JSON in your browser. The RFC 8259 rules that cause most errors, how to read the line and column, and when to sort keys.
- How to count words for essays and applicationsCheck your word and character count the way markers and UCAS do. UK limits for personal statements, essays and dissertations, plus what counts as a word.