Advertisement
Guide
About the Diff Viewer
A diff shows exactly what changed between two versions of a piece of text — which lines were added, which were removed, and which stayed the same. It's the same idea behind code review and version control, applied to any two blocks of text you paste in. This viewer highlights additions and deletions in color so differences jump out at a glance.
It's useful for comparing config files, spotting what changed in an API response, reviewing edits to a document, or checking two JSON payloads against each other. Everything runs in your browser — even sensitive files never leave your device.
Line diff vs. word diff
This tool compares text line by line, which is ideal for code, config, and structured data where each line is a meaningful unit. If you're comparing prose — essays, paragraphs, documentation — a word-level diff often reads better because it highlights the specific words that changed within a sentence. For that, try the dedicated Text Diff tool.
Comparing JSON cleanly
Two JSON objects can be logically identical but formatted differently, producing noisy diffs. For a meaningful comparison, format both with the JSON Formatter first (same indentation and key order), then diff them. That way the highlighted differences reflect real changes in the data, not just whitespace.
How to use it
- 1Paste the original text or JSON on the left.
- 2Paste the changed version on the right.
- 3Review the color-coded output: additions, deletions, and unchanged lines.
- 4For prose, switch to the Text Diff tool for word-level highlighting.
Frequently asked questions
What do the colors mean?
Typically, removed lines are shown in red and added lines in green, while unchanged lines stay neutral. This makes it easy to see what was inserted or deleted between the two versions.
Can I compare two JSON objects?
Yes. Paste each JSON block on one side. For the cleanest results, format both with the JSON Formatter first so differences reflect data changes rather than formatting.
What is the difference between this and the Text Diff tool?
This Diff Viewer compares line by line, which suits code and structured data. The Text Diff tool compares word by word, which is better for prose.
Is there a size limit?
You can compare large blocks of text, but extremely large inputs may slow down the browser since all processing is local.
Is my text uploaded anywhere?
No. The comparison runs entirely in your browser, so nothing you paste is sent to a server.
