Skip to content
Type & Text

Text Diff

Online text compare tool: paste or open two versions and see every added and removed line highlighted side by side. Nothing is uploaded.

  • #text compare
  • #compare two texts
  • #compare text files
  • #code compare
  • #diff
  • #compare
  • #text
  • #changes
  • #merge
100% client-side

Runs in your browser. Your data never leaves this device.

The Workbench
Text Diff — workspaceLive
Paste text on both sides to see the differences.

contributed by Pranav K with some tweaks: word wrap toggle with synced line numbers, flat typed array for the lcs table, deferred diff computation, file size cap, and a few accessibility fixes.

Network requests0
Bytes uploaded0
Trackers fired0
The Guide

About Text Diff

/01 Comparing two versions of a text

Paste an original and a revision and every difference is highlighted — what was added, what was removed and what changed. Far quicker and far more reliable than reading two documents side by side and hoping you notice.

Useful for contract revisions, copy edits, configuration files, translated strings and any pair of documents where a small change matters.

/02 Reading a diff

Additions and deletions are marked separately, so a rewritten sentence shows as both. Changes are located precisely rather than flagging whole paragraphs, which makes it obvious when the only edit was a single number or a negation.

This is the same idea version control uses to review code, applied to plain prose — and it catches the edits that are easy to miss, like a changed date, a dropped 'not', or an altered figure.

/03 Compare two texts online without uploading them

Most online text compare sites send both versions to their server to calculate the difference. For a contract, a config file with secrets in it, or an unpublished draft, that is a real risk for a small convenience. This text compare tool does the whole comparison in your browser tab.

Paste the old version on the left and the new one on the right, or use the Open button on each side to load a file straight from your device, up to 5 MB each. Plain text formats all work: .txt, .md, .csv, .json, .xml, .yaml, .log, HTML, CSS and source code. The result lists every line with numbers on both sides, marks what was added and removed, and counts the changes, with a word wrap toggle for long lines.

/04 Getting a clean comparison

The comparison works line by line, which is exactly how code review tools show changes. That makes a little preparation worthwhile. Format both versions the same way first: if one JSON file is minified and the other is pretty-printed, every line will show as changed even when the data is identical.

For prose, the same rule applies at sentence level. Put each sentence on its own line before comparing and a single edited word stands out as one changed line, instead of a whole rewritten paragraph. Watch for invisible differences too. Trailing spaces and Windows versus Unix line endings can make lines that look the same count as different.

FAQ

Questions about Text Diff.

Can it compare documents rather than plain text?
Copy the text out of the documents and paste it in. The comparison works on text, so formatting differences between the source files are ignored.
Are my documents uploaded?
No. Both texts are compared in your browser and never sent anywhere, which matters for contracts and unpublished drafts.
Does it show word-level or line-level changes?
Line level. Each line is marked as added, removed or unchanged, with line numbers on both sides, which suits code, config files and lists. For a rewritten paragraph, put each sentence on its own line first so the edited sentence stands out.
How do I compare two text files?
Click Open above each pane to load a file from your device, up to 5 MB each, or paste the contents. Any plain text file works, including code, JSON, CSV and logs. Word documents and PDFs need their text copied out first.
Can I use it to compare code?
Yes. Line-based comparison is how code review tools display changes, so it suits source files, JSON, YAML and SQL well. Turn word wrap off to keep long lines on one row, and format both versions with the same indentation so spacing changes do not flood the result.
Related
PX to REM Converter

Convert px to rem and rem to px against any root font size, with a quick reference table of common pixel values.

px to remrem to pxtailwind rem
Line Height Calculator

Line height calculator: get readable line heights for any font size as a unitless ratio, pixels or percent, with a live preview.

line height calculatorcss line heightleading calculator
Typography Calculator

Convert points to mm, inches, picas, ciceros, agates, pixels and rem, for print and screen typography, with a quick reference.

points to mmpt to pxpica to inches
Glyph Browser

Browse and copy Unicode characters: symbols, arrows, currency, maths, emoji and more, searchable by name or code point.

unicode charactersspecial characterssymbols copy paste
Word Counter

Free online word counter for words, characters, sentences and paragraphs, with reading and speaking time, updated as you type.

word countercharacter counterspeaking time
Large Type

Show big text on your screen: blow a short password, code or message up to read across a room, with look-alike characters colour-coded.

big textlarge text displayshow text on screen
Text Editor

Free online text editor for Markdown with live formatting, tables, footnotes, focus mode, and export to Markdown, HTML or PDF.

online text editormarkdown editor onlinedistraction free writing
Text Scratchpad

Online notepad that saves in your browser, with tools to change case, sort, remove duplicates, find and replace, and clean up text.

online notepadtext case converterremove duplicate lines
Font File Explorer

Online font viewer: open a TTF, OTF, WOFF or WOFF2 file to preview it at any size with your own text and get ready-to-use CSS, without installing it.

font viewerttf viewerotf viewer
Shavian Transliterator

Shavian alphabet transliterator: convert English text into Shavian script, with alternate spellings for words pronounced more than one way.

shavian alphabetenglish to shavianshavian translator