Text Diff Checker - Compare Two Texts Line by Line

Tools / Text 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
Online Notepad Write notes in your browser with no sign-up. Text is saved automatically on this device, never uploaded. Word and character count, .txt download.
Popular Today
Text Cleaner Fix text copied from a PDF: join broken lines, keep paragraphs, mend split words, remove extra and invisible spaces and straighten curly quotes.

Other text tools

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.
Lorem Ipsum Generator Free Lorem Ipsum generator: create placeholder text by paragraph, sentence or word count, with optional HTML tags for your design mockups.
Case Converter Free case converter: switch any text between lowercase, UPPERCASE, camelCase, PascalCase, snake_case, kebab-case and CONSTANT_CASE in one click.
Sort Lines Sort a list A to Z, Z to A, naturally (file2 before file10), by length or at random, and remove duplicate and empty lines. Runs 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.
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.
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.