Text and Strings

text diffinspect the edit at the right scale

Compare two versions and keep their original patch.

text diff

Original text

Modified text

Text stays in this browser; it is not uploaded.

Differences

The view uses your filters: spaces and tabs are removed, or letters lowercased, when enabled. Original inputs stay intact.

Characters are Unicode code points; words group letters, numbers, marks and underscores. CR ␍, LF ␊ and tab ⇥ are display markers only.

Comparison options

Only LF splits lines; CR and a final LF are preserved. Pasting or editing can normalize line endings in the browser.

Enter two versions; either side may be empty.

Export always uses the exact originals, unaffected by filters or granularity. A matching view can still have a patch; identical originals cannot be exported.

A text diff helps review a changed setting or a revised paragraph without reading both versions from beginning to end. Start with whole lines, then narrow the comparison when a small edit is hard to see.

This diff checker treats code, prose and logs as ordered text. To compare two texts meaningfully, keep the old version on the left and the intended replacement on the right.

Why use this text diff?

Zoom from a line to one symbol

A text diff can mark an entire rewritten line or isolate a changed identifier. Word mode groups letters and numbers; character mode compares Unicode code points, useful for punctuation and small numeric edits.

One changed passage shown as a line, a word group and a single symbol.

Keep the patch faithful to the originals

Filtering the review should not remove edits from an exported patch. Even when the screen treats spacing or case as equal, the unified diff still records the exact original-to-target change.

A filtered comparison and a separate patch retaining the original changes.

Check the review before exporting

01

Choose the unit for the change

Lines reveal inserted paragraphs. Words group identifiers and prose tokens. For continuous Chinese or Japanese text, character mode gives finer detail because word mode does not use a language dictionary.

02

Know when your result refreshes

Automatic comparison waits 350 ms after editing. Turn it off for the Compare button or Ctrl/Cmd+Enter. Editing either input or a comparison option disables export until a fresh result is ready.

03

Read the patch note before saving

Only 50 blocks appear initially; reveal more without changing the full export. Swap, Example and Clear offer a preview before application and one undo. A filtered match can still have an exact patch.

Three ways to inspect an edit

Ordered changes

Removed content belongs to the left version; added content belongs to the right. Moving a paragraph can appear as deletion and insertion rather than a special move operation.

Two review layouts

Read old and new blocks side by side or follow them in a unified stream. Changing the layout does not turn the screen into the patch file: the download is always a separate exact line diff.

Visible line endings

CR, LF and tabs receive display markers so invisible differences can be located. A final LF remains significant, and the patch retains the actual characters instead of their markers.

Precise comparison boundaries

Bounded computation
Each side accepts 200,000 UTF-16 units and at most 50,000 tokens. View and patch calculations each stop at 500 ms or 2,000 edits; either failure rejects the whole result without truncation.
Filtering has a narrow definition
Ignore whitespace removes ASCII spaces and tabs only; line breaks and other Unicode spaces remain. Ignore case uses JavaScript lowercase, without locale folding or NFC normalization. The view shows this processed text; inputs stay intact.
Characters are code points
A joined emoji or combining accent may contain several compared units. Word tokens group consecutive Unicode letters, numbers, marks and underscores, preserving other tokens. Isolated UTF-16 surrogates are rejected to keep UTF-8 export exact.
Text is not document structure
Only LF separates lines; a preceding CR remains content. Pasting may normalize line endings before comparison. There is no PDF/Word import, JSON structure analysis, three-way merge, patch application or code execution.

Text diff questions

How does this differ from JSON diff?

Text diff compares the written sequence. Reordering JSON keys still changes that sequence; a structural JSON comparison instead examines parsed values. This page never parses or executes the pasted code.

Can I ignore whitespace, case or blank lines?

ASCII spaces and tabs can be ignored, as can case through lowercase comparison. Blank lines and line endings are retained. Turn both filters off when checking the exact input text.

What is a unified diff used for?

It records line changes with file headers and context, suitable for reviewing or processing with patch tools. Here export always uses both originals, regardless of the selected display filters; identical originals have no patch to export.

Why does changing one word mark a whole line?

Line mode compares a line as one unit. Select word or character mode to inspect a smaller change. Counts refer to the selected units and should not be interpreted as a number of human editing actions.

How large can the inputs be?

Each input has a 200,000 UTF-16-unit ceiling plus token and computation limits. Highly different short texts can also hit the computation limit. Split the inputs into related sections and compare again.

Found an unexpected difference?

Return to text diff

Use text diff to inspect the next pair of versions, then export the complete original changes.