Diff Checker
Compare two texts line by line and see exactly what was added, removed, or unchanged — in your browser.
Privacy: your files never leave your device. All processing happens locally in your browser.
How to use
- 1.Paste the original text into the left "Original" box.
- 2.Paste the new version into the right "Changed" box.
- 3.Read the line-by-line result below: lines marked with + were added, lines marked with - were removed, and the summary shows the total added, removed, and unchanged counts.
About Diff Checker
A diff checker (short for "difference") compares two versions of a text and highlights what changed between them. Paste the original on the left and the changed version on the right, and this tool shows you a line-by-line breakdown: which lines were added, which were removed, and which stayed the same — with a running count of each.
Under the hood it uses the Longest Common Subsequence (LCS) algorithm, the same classic dynamic-programming technique that underpins the Unix diff utility and the comparison views in Git, GitHub, and GitLab. LCS finds the longest sequence of lines that appears in both versions in the same order; everything outside that shared backbone is reported as an addition (in the changed text) or a deletion (from the original). The practical payoff is that when you edit one line in the middle of a long document, the tool marks just that one line as changed instead of flagging every line after it as different — the alignment stays anchored to the lines that really match.
This is a line-level diff, not a character-level one. It compares whole lines, which is exactly what you want for source code, configuration files, logs, JSON, CSV, prose paragraphs, and Markdown — anywhere the meaningful unit of change is a line. If two lines differ by even one character, the old line shows as removed and the new line as added, so you can see both side by side and spot the edit.
Typical uses: code review before committing, checking what a teammate changed in a config file, comparing two drafts of an article or contract, verifying that a copy-paste didn't silently drop lines, confirming two exported files are identical, or auditing the difference between a template and a filled-in version. Because changes are marked with a leading + and - as well as color, the output stays readable even for color-blind users and when pasted into plain-text notes.
Everything runs client-side. The two texts you paste are compared entirely in your browser using JavaScript — nothing is uploaded to any server. That makes it safe for sensitive material like private source code, internal configs, unpublished writing, or confidential documents, unlike online diff tools that POST your content to a backend. Close the tab and the data is gone.
The comparison is instant and updates as you type, so you can tweak either side and watch the diff recompute in real time. For very large inputs (many thousands of lines) the LCS comparison needs proportionally more memory, but for everyday files, code, and documents it is effectively immediate.
Methodology & sources
Line-level diff computed via the Longest Common Subsequence (LCS) dynamic-programming algorithm.
Frequently asked questions
- How does the diff checker decide what changed?
- It uses the Longest Common Subsequence (LCS) algorithm — the same approach behind Unix diff and Git — to find the longest run of lines shared by both texts in the same order. Anything outside that shared backbone is reported as an added or removed line, so a single edit in the middle of a long document is flagged as just that one line rather than everything after it.
- Is this a line-by-line or character-by-character comparison?
- It compares whole lines. That is the right granularity for code, config files, logs, JSON, and prose. If two lines differ by even one character, the old line is shown as removed and the new one as added, so you can see both and locate the exact edit.
- Is my text uploaded anywhere?
- No. Both texts are compared entirely in your browser with JavaScript, so nothing is sent to a server. It is safe to compare private source code, internal configuration, unpublished drafts, or confidential documents — close the tab and the data is gone.
Related tools
- JSON FormatterFormat, minify, and validate JSON in your browser — pretty-print or compress with pinpoint error locations.
- Subnet CalculatorEnter an IP and CIDR prefix or subnet mask to instantly get network, broadcast, host range, and mask details.
- UUID GeneratorGenerate cryptographically random RFC 4122 v4 UUIDs in bulk — copy one or all, in your browser.
- ANSI Color Codes GeneratorBuild and copy raw SGR escape sequences and search the standard 8 plus bright 8 terminal color codes.
- ASCII TableLook up every standard 7-bit ASCII code with exact decimal, hexadecimal, octal, and binary values.
- Badge GeneratorBuild a Shields.io badge URL, Markdown snippet, and HTML image tag without memorizing path escapes or query parameters.
Developer Tools guides
View all- How to Check Different Times on Google Maps and Files
- How to Check the Difference Between Two Files in Linux
- How to Check the Difference Between Two Git Branches Online
- Diff Checker in VS Code: A Quick Browser-Based Method
- Compare Text Differences in VS Code with a Browser Diff Checker
- Check XPath in Chrome Console Against Any XML
- Convert XML to CSV Without Losing Repeated Fields
- Format XML Data in Notepad++ Without a Plugin
- Convert .properties Files to JSON Online
- Random MAC Address On or Off: A Developer Guide
- Generate a JWT for Testing: HS256 Tokens in Your Browser
- How to Decode JWT Tokens in Angular Apps
- JSON Schema to Zod: Inference Limits and a Safer Path
- Rust: Convert a Struct to a JSON String With serde
- How to Convert JSON to Excel in Python
- JSON to CSV Alternative With Built-In Formula Protection
- Format a JSON File in VS Code and in Your Browser
- Local JavaScript Playground Alternative for Safe Testing
- How to Convert IPv4 to a 32-Bit Integer for Storage
- Convert Decimal Numbers to IEEE 754 Floating Point Format