Compare Text Online with a Free Diff Checker

Paste or upload original and changed text, then review additions, deletions, and modifications side by side. Everything is processed locally in your browser without signup.

Original and changed text

0 characters · 0 words · 1 line
Drop an original text file here, or choose one
0 characters · 0 words · 1 line
Drop a changed text file here, or choose one

Accepted text formats: TXT, MD, CSV, JSON, XML, YAML, HTML, CSS, JavaScript, Python, SQL, ENV, and LOG. Executables, PDFs, office documents, images, archives, and other binary files are not supported.

Words highlights changed words within aligned lines. Ignore case keeps displayed capitalization; Ignore whitespace treats indentation, tabs, repeated spaces, and line-ending differences as equal; Ignore blank lines excludes empty or whitespace-only lines.

Private comparison: Compare and file-reading operations run inside your browser; those actions do not transmit your text. Inputs are stored only when you opt into local saving, and can be deleted above.

Technical disclosure: the comparison worker and diff code are included in this page, so comparing does not request an external diff library. The site itself may still load ordinary page resources. Last tested: 18 July 2026.

Comparison result

Enter both texts or try the sample to begin.

No comparison yet.

Use Previous change and Next change with a mouse, touch, or keyboard. Split view keeps line numbers and both sides aligned in one synchronized scroller.

Copy patch creates portable unified text with − and + markers. Rich HTML includes self-contained colors for a document or email. The downloadable HTML report includes filenames, options, counts, and print styles.

Keyboard shortcuts: Ctrl/Cmd + Enter compares; Ctrl/Cmd + Shift + S swaps.

Advertisement

How to compare two texts

  1. Paste text into Original and Changed, or load one supported text file into each side.
  2. Choose Words, Characters, or Lines and set any case or whitespace rules, then select Compare. A short automatic comparison also runs after you pause typing.
  3. Review the aligned lines, navigate each change, switch views, or export a patch or report.

Color and symbol legend

+ Added in Changed − Removed from Original ~ Modified line Unchanged line

Choose the right comparison mode

Words for prose

Use word-level emphasis for document drafts, contracts, essays, translations, and editorial revisions where whole-word changes matter most.

Characters for precision

Use character mode for punctuation, identifiers, short source-code edits, numbers, URLs, and subtle spelling differences.

Lines for long or structured text

Use line mode for source code, configuration files, SQL, CSV data, logs, and long documents where inserted or removed rows are the review unit.

The worker uses a Myers-style shortest-edit-script comparison over normalized line or token keys, while rendering the untouched source characters. It pairs adjacent removed and added lines as modifications and applies the selected token mode within those lines. It does not detect moved blocks or semantic equivalence.

Performance: Line mode is designed and tested for text files up to 1 MB per side. Word and character modes are intended for smaller excerpts because token-level comparisons require more work. Automatic comparison pauses for large input, stale worker jobs are cancelled, and a warning appears before an unusually large manual comparison. A highly divergent large comparison is stopped if its edit search exceeds the browser work budget.

Text comparison FAQ

What do the diff colors and symbols mean?

A green plus marks text added to Changed, a red minus marks text removed from Original, and an amber tilde marks a modified line. Unchanged lines have no symbol.

How do I compare two text files?

Drop a supported text file onto each upload area, or use the file pickers, then select Compare. TXT, MD, CSV, JSON, XML, YAML, HTML, CSS, JavaScript, Python, SQL, ENV, and LOG files are supported; binary formats are rejected.

Which comparison mode should I choose?

Choose Words for prose, Characters for exact punctuation or short code changes, and Lines for long documents, source code, configuration files, or logs.

Can case and whitespace be ignored?

Yes. Ignore case compares letters without changing their displayed capitalization. Ignore whitespace treats indentation, repeated spaces, tabs, and line-ending differences as equal. Ignore blank lines can also exclude empty or whitespace-only lines.

Does the diff checker work with code?

Yes. It compares source code, HTML, CSS, JavaScript, Python, SQL, configuration files, and logs as plain text while preserving their original characters in the result.

What are the practical size limits?

Line mode is designed and tested for text files up to 1 MB per side. Word and character modes are best for smaller excerpts; the tool warns before unusually large comparisons and may ask you to switch to Line mode.

Is the tool free, and does it require signup?

The tool is free to use and does not require an account or signup.

Is my text uploaded or stored?

The Compare action and file reading run locally in your browser and do not transmit the entered text. Text is not stored unless you select Save inputs on this device; Delete saved text removes that browser storage.

How do diff exports work?

Copy patch creates portable unified text with minus and plus lines. Copy rich HTML creates a styled clipboard version. Download HTML saves a self-contained, print-friendly report with labels, options, and change counts.

Does this detect semantic similarity or plagiarism?

No. It finds literal text changes after the selected case and whitespace rules. It does not judge meaning, identify paraphrases, or perform plagiarism checking.

Explore more tools