Text Diff Checker - Compare Two Texts Line by Line

2on /
/ Dev Tools / Text Diff

Text diff checker

What this diff tool does

Two versions of a contract, a configuration file or a chunk of code, and the question is always the same: what actually changed? Paste both here and the answer is marked in place, without either version being uploaded anywhere.

How to use it

  1. 1 Paste the older version on the left and the newer one on the right.
  2. 2 Pick line or word level, and tick the options if spacing or capitalisation should not count as a change.
  3. 3 Press Compare, then switch between side by side and inline, or copy the result as a unified diff.

Why a naive comparison is useless

Walking both texts in step and marking every position where they differ is the obvious approach, and it falls apart the moment a single line is inserted: everything after it shifts by one and the whole rest of the document lights up as changed. This page uses the Myers algorithm instead, which searches for the shortest edit script, so an inserted line is reported as one insertion.

Line level or word level

Line level answers which lines moved, appeared or vanished, which is what you want for code and configuration. Word level goes inside a changed pair of lines and marks only the words that differ, which is what you want for prose where a single word was replaced. Both are shown from the same comparison, so switching does not recompute anything from scratch.

Line by line
- Merhaba dunya
+ Merhaba guzel dunya
Word by word
Merhaba guzel dunya

Ignoring spaces and letter case

The options change what counts as the same, not what you see. Text is compared through a normalised key while the lines on screen stay exactly as you typed them, so a file that was only re-indented shows no changes at all, and you can still read the real spacing in the result.

Both texts stay on your machine

Diff tools are used on things people are not free to share: draft contracts, deployment configuration, patient notes, unreleased code. The comparison here happens in the page, so there is no upload, no temporary copy on a server and nothing to delete afterwards.

Text diff checker - frequently asked questions

No. Everything runs in the page, so you can load it, disconnect from the network and still compare. That matters here more than on most tools, because the documents people compare are usually the ones they are least free to hand over.
New
Color Converter Convert a color between HEX, RGB and HSL, build a scale of shades, and check the contrast ratio against white, black or any second color.
Popular Today
Color Converter Convert a color between HEX, RGB and HSL, build a scale of shades, and check the contrast ratio against white, black or any second color.

Related Dev Tools

MD5 Hash Generator Free MD5 hash generator: turn any text or file into an MD5 checksum in your browser - useful for integrity checks and quick fingerprinting.
Base64 Encoder & Decoder Free Base64 encoder and decoder: convert text or files to Base64 and back, entirely in your browser - nothing is uploaded to a server.
Lorem Ipsum Generator Free Lorem Ipsum generator: create placeholder text by paragraph, sentence or word count, with optional HTML tags for your design mockups.
JWT Decoder Free JWT decoder: paste a token to read its header, payload and signature in a readable form - decoding happens in your browser, nothing is sent.
URL Encoder & Decoder Free URL encoder and decoder: convert links and query parameters to percent-encoding and back, with full-URL and component modes, in your browser.

Other Tools You May Like

Word to PDF Convert Word to PDF for free: upload a DOC, DOCX, ODT or RTF file and download a properly formatted PDF in seconds - no registration or watermark.
PDF to Word Convert PDF to Word for free: upload a PDF and download an editable DOCX in seconds - no registration, no watermark and nothing to install.
Word Counter Free word counter: paste any text to count words, characters, sentences and paragraphs, and see the estimated reading time - nothing leaves your browser.
Character Counter Free character counter: count characters with and without spaces, plus words and lines, and check SEO limits for titles and meta descriptions.
Keyword Density Checker Free keyword density checker: paste text or a URL to see how often each word and phrase appears, with percentages for one, two and three-word terms.