ToolCozy
JSON Format / DiffHOTBase64 CodecHOTURL CodecNEWTimestamp ConverterNEWUUID GeneratorHash CalculatorJWT DecoderQR Code GeneratorUnit ConverterNumber BaseData ConverterSQL FormatterIP Lookup
Image CompressHOTColor ConverterImage ConvertImage CropNEWApp Store ScreenshotNEW
Regex TesterNEWWord CounterText DiffMarkdown Preview

More Products

Playbit Games

Free online HTML5 games — play instantly in your browser

Kaola Screenshot

App Store screenshot generator with device frames & templates

Pillease

Simple pill reminder app — never miss a dose again

© 2026 ToolCozy·Privacy·Feedback

Text Diff

Side-by-side text comparison with highlighted differences

About this tool

A text diff tool compares two versions of a document side by side and highlights what changed. Useful for spotting subtle edits in contracts, validating that a copy-paste didn't drop characters, comparing config files between environments, or reviewing AI-edited prose.

This diff runs entirely in your browser — paste original on the left, modified on the right, and see additions, deletions, and changes color-coded line by line. Sensitive content (legal text, internal configs) never leaves your device.

How to use

Compare two texts

  1. Paste the original version on the left side.
  2. Paste the modified version on the right side.
  3. Differences appear automatically: green for added lines, red for removed, with inline character-level highlighting.
  4. Scroll synchronously through both panes to spot every change.

Examples

Code change

Input
Original:
function greet(name) {
  return "Hello, " + name;
}

Modified:
function greet(name) {
  return `Hello, ${name}!`;
}
Output
Line 2: removed   return "Hello, " + name;
Line 2: added     return `Hello, ${name}!`;
Frequently asked questions
Is the diff line-based or word-based?

Both. Lines are matched first (so a re-ordered paragraph shows as moved, not as a giant rewrite), then within each changed line we highlight the specific characters that differ.

Can I ignore whitespace differences?

Not currently — the diff is exact. If trailing-space differences are noise for your use case, run the text through a normalizer first (or use a CLI diff with --ignore-trailing-space).

Does it support file uploads?

Paste only. For files, open them in any editor and copy the contents. For very large files (megabytes) the in-browser diff will be slow — use git diff or a desktop diff tool instead.

What's the maximum size?

No hard limit, but performance degrades past ~10,000 lines. The diff algorithm is O(n × d) where d is the edit distance — small differences in large files are still fast; large differences in large files can take seconds.

Is this the same as git diff?

Same purpose, different algorithm. git diff uses the Myers algorithm with several heuristics tuned for code; this tool uses a similar line-based approach. For reviewing actual git history, use git diff itself — it understands renames and merges.