Text Diff Checker
Compare two texts line, word or character by character, side by side or unified — merge arrows, ignore-pattern rules, and syntax highlighting for 8 languages.
Ctrl+Alt+C compare · Ctrl+Alt+S swap · Ctrl+Alt+R clear
See what changed between two texts
Paste the original text on the left and the changed text on the right, and it compares as you type. Additions are highlighted in green, removals in red, and unchanged text stays plain. Switch the granularity among Line, which compares whole lines and suits lists, configs and code; Word, which marks the changed words inside the line; and Character, the finest view of all: characters are counted by code point, so an emoji or a Korean syllable is one character and never half of one. Two checkboxes relax the match: Ignore case treats letters the same regardless of capitalization, and Ignore whitespace ignores spacing differences entirely. Each side has its own Paste and Open file buttons for text files, and you can drag a file straight onto either box — a .docx or .odt is unpacked to its text in your browser, anything else is read as text, and a file over 10 MB is refused with both sizes named rather than quietly truncated.
Side by side, line numbers and merge arrows
Unified prints one column with + and - markers. Side by side puts the original and the changed version in two columns, each numbered from its own text, so a changed line sits opposite the line it replaced. In the side-by-side view every run of changed lines carries → and ← buttons on its first row: press one and that block's version is written into the other box, with every line outside the block kept character for character and the line ending — LF or CRLF — that side already used. Hide unchanged keeps three lines either side of every change and folds the rest into a row that says how many it folded, and it tells you outright when the two texts are identical instead of printing the whole file back at you. Wrap lines switches between wrapped lines and one long scrolling line, a counter says how many lines were added and removed, and Copy and Download hand you the comparison as a classic unified diff in a .txt file — always the whole thing, even when the screen is showing folded context or only the first 2,000 rows.
Ignore rules, syntax highlighting and tidy-ups
Turn on Ignore rules and write one regular expression per line — [0-9]{4}-[0-9]{2}-[0-9]{2} for a date stamp, or a pattern for a build number or a session id. What a rule matches is dropped from the comparison only; the result still shows your original characters. A line that is not a valid regular expression is named by its number and left unapplied rather than applied silently. The two checkboxes work the same way: the ignore options only normalize the text used for matching, so reindented code compared with Ignore whitespace still displays its real spacing. Set Syntax to JavaScript, TypeScript, Python, Java, Go, SQL, JSON or YAML and the code is coloured while it is compared — colours and change marks are cut to the same boundaries, so a changed string is both coloured and marked. Highlighting reads one line at a time, so a block comment is coloured to the end of its line and no further. Four buttons rewrite both boxes for texts that were never meant to line up: sort lines, turn line breaks into spaces, remove extra spaces, and lowercase. They change the text where you can see it, which is exactly what makes them different from the ignore options.
Size, sharing and privacy
Under the hood it runs a longest-common-subsequence diff over tokens — lines for Line mode, or words and the whitespace runs between them for Word mode — so it finds the smallest set of additions and removals. No comparison is refused for being too large: a block bigger than the exact table can hold is split on anchor lines that occur exactly once on each side, and each gap is compared on its own, which handles 20,000 lines a side exactly. A block with no anchor to split on comes back as replaced whole and the tool says so on screen, rather than passing a coarse answer off as the minimal one. Above 200,000 characters of input it stops recomparing on every keystroke and waits for the Compare button, and a changed line longer than 4,000 characters is marked changed end to end instead of being lined up inside. Share link packs the two texts and the settings — granularity, view, both ignore options, your ignore rules and the syntax language — compressed into the URL itself, so the link needs no account and nothing is uploaded; if the code would run past 4,000 characters it refuses and tells you how long it came out. Ctrl+Alt+C compares, Ctrl+Alt+S swaps the two sides and Ctrl+Alt+R clears both. Export PDF saves the same whole comparison as a paginated document, every line with both line numbers and its + or - marker. The PDF engine is downloaded only when you press it, a font for Korean or other non-Latin text only when the comparison contains some, and any character no bundled font can draw is listed on screen rather than dropped in silence. In the side-by-side view each change also has a ✎ button for a note of your own. Notes are kept in this browser only, never in the share link, the .txt or the PDF, and the two texts are not stored with them. Once either text changes, a note is listed apart as written for another version of these texts, and it comes back when the texts match again. Everything runs locally in your browser — nothing is uploaded.
Frequently asked questions
When should I use Word mode instead of Line mode?
Line mode compares whole lines, so changing a single word marks the entire line as removed and re-added — ideal for code, configs and lists where the line is the unit. Word mode diffs token by token and highlights just the words that changed inside a line, which reads far better for prose, sentences and edited paragraphs.
Do the Ignore case and Ignore whitespace options change my text?
No. They only affect how tokens are matched: Ignore case compares letters regardless of capitalization, and Ignore whitespace strips spacing before comparing, so reformatted or reindented text stops showing up as changes. The highlighted output still shows your original characters exactly as you pasted them.
Is there a size limit?
There is no limit on the text you paste or type. Large inputs are split on anchor lines so the comparison stays fast; if a block has no anchor to line up on, it is shown as replaced whole and the tool says so. Above 200,000 characters it stops comparing as you type — press Compare when you are ready.
Can I merge a change from one side into the other?
Yes. Switch the view to Side by side and every run of changed lines gets → and ← buttons on its first row. → writes the left version of that block into the right box, ← does the reverse, and every line outside the block is kept character for character — including whether that side uses LF or CRLF line endings. The merged text lands back in the editable box, so you can carry on comparing or editing from there.
Can I share a comparison with someone?
Press Share link. The two texts and the settings — granularity, view, both ignore options, your ignore rules and the syntax language — are compressed into the link itself, which is copied to your clipboard — or shown to copy by hand when the browser refuses — and is never written into the address bar. Nothing is uploaded and there is no account, so anyone who opens the link sees the same comparison. Because it all has to fit in a URL there is a limit: if the code comes out longer than 4,000 characters the tool refuses and tells you how long it was.
Can I ignore timestamps, build numbers or session IDs?
Yes. Tick Ignore rules and write one regular expression per line — <code>[0-9]{4}-[0-9]{2}-[0-9]{2}</code> for a date, for instance. Anything a rule matches is dropped from the comparison only, so two log lines that differ just by their timestamp count as unchanged while the result still shows the real timestamps. A line that is not a valid regular expression is reported by its number and not applied, so a typo in a rule cannot silently change what you are comparing.
Can I compare a Word document?
Drag a .docx or .odt file onto either box and its text is unpacked in your browser — both formats are zipped XML, so no converter and no upload are involved. Files up to 10 MB are accepted; anything else you drop is read as plain text. PDFs are not read here, so run one through Extract Text from PDF first and paste the result.
How do I see only the differences in a long file?
Tick Hide unchanged. It keeps three lines of context either side of every change and folds everything else into a row that says how many lines it folded, in both the unified and the side-by-side view. If the two texts are identical it says so instead of printing the file back at you. The screen draws the first 2,000 rows and tells you when there are more, while Copy and Download always give you the whole diff.
Does it highlight code syntax?
Yes, for eight languages: JavaScript, TypeScript, Python, Java, Go, SQL, JSON and YAML. Colours and change marks are cut to the same boundaries, so a changed string is both coloured and marked as changed. The highlighter reads one line at a time — a diff shows lines out of order, so carrying state between them would paint the wrong half of the file — which means a block comment is coloured to the end of its line and no further.
Can I leave notes on a change?
Yes. In the side-by-side view every run of changed lines has a ✎ button beside its merge arrows: press it, write the note and save it. Notes are kept in this browser only. They are not in the share link, the .txt or the PDF, and the two texts are not stored with them, only a short fingerprint of each. Once either text changes, the note moves into a closed list of notes written for other versions of these texts. It comes back when the texts match again, and that list has a button that deletes them all.