Diff Checker
Original Text
Changed Text
Diff result will appear here
Enter two texts and click "Find Differences" to compare
About the Diff Checker
The Diff Checker compares two text blobs side-by-side using the same line-diff algorithm Git and unified-diff tools rely on (jsdiff under the hood). Paste two snippets — JSON, code, configuration, log lines, prose — and read the additions, deletions, and changes inline. Word-level granularity highlights the specific changed tokens within a line. Everything runs in your browser and nothing is sent to our servers, and neither text is saved in the page address; both go into a link only when you click Share.
Updated: May 8, 2026
Related Tools
Related Articles
- What Actually Breaks When You Open Large JSON in a Browser TabWhy big JSON freezes browser tabs: JSON.parse cost vs DOM node count, how ToolRunner's JSON Viewer renders trees, and the honest limits of client-side.
- The URL Is the Database: Shareable Tool State Without a ServerHow ToolRunner packs entire tool sessions into query parameters with debounced replaceState, lz-string compression, and a hard 8,000-character URL budget.
How to use the diff checker
- Paste the original text on the left, the modified text on the right, then click Find Differences to run the comparison.
- Switch between line-level (default) and word-level granularity. Word-level highlights the changed tokens inline in a single view, useful for prose review or near-identical config files.
- Use the file-upload buttons to load the original and changed text from disk (up to 5 MB each), or paste directly into the editors.
- For line-level diffs, switch between side-by-side and unified views — side-by-side aligns matching lines across two columns with synchronized scrolling; unified renders the classic single-column `+/-` diff. Small screens auto-collapse to unified.
- Stats appear once a comparison runs: line additions, deletions, and the total change count.
Common use cases
- Code review prep — paste the before/after of a refactor to see exactly what changed before opening the PR.
- Configuration drift detection — production config vs staging config, helm values before and after a template render, Terraform plans.
- Log line comparison — two requests that should have produced the same output but did not. Word-level diff pinpoints the divergent field.
- Documentation diff — proofreading two versions of a paragraph, README updates, blog post revisions.
- JSON/YAML structural review — paste two API responses or two manifests; the line diff surfaces field-level changes without requiring `jq` or `yq`.
Privacy and security
jsdiff runs entirely in your browser, and nothing you paste is sent to our servers or analytics. Neither text input is written to the page address while you type, so they do not reach our CDN on reload or stay in browser history. They go into a link only when you click Share (lz-string compressed when long, not encrypted), and anyone with that link can read them. Do not share links to production secrets or customer PII, and click Clear when you are done. The diff itself works with the network disconnected. A shared link stays in the recipient's browser history and in any app the link passes through.
Tips and pitfalls
- Line-ending mismatches (LF vs CRLF) cause every line to diff. The tool has no ignore-whitespace option, so normalize line endings in your editor first. If you see "every line changed" between two seemingly identical inputs, this is usually the cause.
- Word-level diff has a complexity ceiling. Two completely different paragraphs produce too many word-level moves to be readable; use line-level for substantive rewrites.
- Trailing newline differences are silent killers. A file with a trailing newline and one without diff at the last line. Some tools handle this implicitly, jsdiff does not.
- Tabs vs spaces: the diff treats them as different characters. To compare reformatted code, normalize both sides through a formatter (Prettier, Black, gofmt) before diffing.
- Unicode normalization: composed (NFC) vs decomposed (NFD) forms of the same character diff at the character level. macOS's filesystem decomposes by default; this trips up filename comparisons.
Frequently Asked Questions
- What algorithm does the diff use?
- jsdiff implements the Myers O(ND) difference algorithm — the same one GNU diff and Git use by default. Output is line-aligned by default, with word-level alignment available as a toggle.
- Can I use this for code review?
- Yes for ad-hoc snippets. For full PR review, use the GitHub/GitLab/Bitbucket diff viewer that integrates with the commit graph. The tool here is best for comparing two snippets you have outside version control — pasted from a chat, dumped from a config, or read from a log.
- How do I diff two large files?
- The browser handles tens of thousands of lines comfortably. For files with millions of lines (large logs, generated SQL dumps), command-line `diff` or `git diff --no-index file1 file2` is the right tool — they stream rather than buffering the whole file.
- Does the diff handle Unicode and emoji?
- Yes. jsdiff treats input as JavaScript strings, so multibyte UTF-8 characters and emoji are diffed correctly at character / word / line granularity. Be aware of the NFC vs NFD pitfall — visually identical characters can have different code points.
- Is whitespace significant in the diff?
- Yes. Spaces, tabs, line endings, and letter case all count as differences, and the tool has no ignore-whitespace or ignore-case option. Normalize both sides first (run them through a formatter, or lowercase them) if those differences are noise.
- Can I export the diff as patch?
- No. The tool shows the diff on screen but has no patch export. For a `.patch` file you can apply with `git apply` / `patch -p1`, save both texts to files and run `git diff --no-index old.txt new.txt > change.patch`.
- How is this different from a JSON-aware diff like jsondiffpatch?
- This tool is a general line/word diff. JSON-aware diffs treat key reorderings as semantic equivalents and produce structural patches. For JSON-specific comparison use jsondiffpatch in code, or sort the JSON keys before pasting (the JSON Viewer can do this).
- Are my pasted texts uploaded?
- No. The diff algorithm runs in JavaScript inside your browser tab, and nothing is sent to our servers or analytics. Neither input is written to the page address while you type; both go into a link only when you click Share.