Diff Checker
Paste text into both boxes to see the differences.
Paste two versions of any text and this tool highlights what changed. View the result side by side, inline with plus and minus markers, or as a git style unified diff. Switch between line level and word level comparison, and choose how to treat whitespace. It uses a longest common subsequence algorithm to find the smallest set of changes, so you see only what actually differs. Everything runs in your browser, so your text never leaves your device.
How to use
- Paste the original text into the left box and the changed text into the right box.
- Pick a view: Side by side, Inline, or Unified (git style with hunk headers).
- Choose Line level or Word level to control how precisely changes are highlighted.
- Tick Ignore trailing whitespace or Ignore all whitespace if spacing differences should not count.
- Read the colored diff and the stats, then use Copy unified diff or Copy inline result to save it.
Examples
- Original line "the quick brown fox" and changed line "the quick red fox" show, in word level mode, only brown removed and red added, with the rest unchanged.
- Comparing two copies of the same paragraph reports the two texts as identical with zero additions, removals, or modifications.
- Adding one line to the end of a list shows only that new line as added and leaves the rest unchanged.
FAQs
- What is the difference between the three views?
- Side by side puts the original and changed text in two aligned columns. Inline stacks the result in one column with plus and minus markers. Unified is the git style format, with @@ hunk headers and a few lines of context around each change. All three describe the same diff.
- What does word level comparison do?
- Line level marks a whole line as changed if it differs at all. Word level goes further: on a changed line it highlights just the words that differ, so a one word edit does not light up the entire line. Switch between them with the granularity toggle.
- How do the whitespace options work?
- Ignore trailing whitespace treats lines that differ only by spaces or tabs at the end as the same. Ignore all whitespace removes every space and tab before comparing, so reformatted indentation does not show up as a change. The displayed text is never altered, only the comparison.
- Can I copy a git style diff?
- Yes. Copy unified diff gives you the unified format with @@ headers, ready to paste into a comment or a patch. Copy inline result gives the full text with a space, minus, or plus in front of every line.
- Is my text uploaded anywhere?
- No. The comparison runs entirely in your browser. Nothing is sent to a server, so it is safe for private or sensitive content.
- Is there a size limit?
- Each side is limited to 5,000 lines to keep the comparison fast. If you exceed that, the tool shows a message instead of freezing, and you can compare smaller blocks.
Related tools
- SQL FormatterFormat and indent SQL queries online. Put SELECT, FROM, WHERE, and JOIN on their own lines, set keyword case, and copy clean results.
- XML FormatterPretty print XML with clean indentation per nesting level. Pick 2 spaces, 4 spaces, or tabs. Validates broken markup, runs in your browser.
- String EscaperEscape and unescape strings for JSON and JavaScript. Convert newlines, tabs, quotes, and backslashes to and from their escaped forms in your browser.
- ASCII ConverterConvert text to ASCII or Unicode code points and back. Encode characters to decimal numbers or decode numbers to text in your browser.
- JSON FormatterFormat, validate, and beautify JSON in your browser. Paste messy JSON, get clean indented output, then copy it back. Free, no signup.
- Base64 EncoderEncode text to Base64 or decode Base64 back to text in your browser. Full UTF-8 support and clear errors on invalid input.