Text Diff Checker
Compare two texts side-by-side or unified to inspect additions, deletions, and modifications.
| 1 | server: | 1 | server: |
| 2 | port: 8080 | 2 | port: 8443 |
| 3 | host: 0.0.0.0 | 3 | host: 0.0.0.0 |
| 4 | timeout: 30s | 4 | timeout: 30s |
| 5 | tls: true | ||
| 5 | logging: | 6 | logging: |
| 6 | level: info | 7 | level: debug |
| 7 | format: text | 8 | format: json |
| 8 | features: | 9 | features: |
| 9 | - search | 10 | - search |
| 10 | - export |
About this tool
A diff shows exactly what changed between two versions of a text. Developers use it to review configuration changes before a deploy, writers compare drafts, support teams compare two log excerpts, and translators check what changed in a source document. Reading two versions side by side by eye is slow and error-prone; a diff points at every added, removed and modified line in seconds.
This checker compares line by line first, then highlights the exact words or characters that changed inside each modified line, like a code review tool. Both texts stay in your browser: nothing is sent to a server, so it is safe for contracts, credentials files and private logs.
How to use Text Diff Checker
- Paste the original text on the left and the new version on the right, or use Open File on either side to load a local file.
- Pick Side by side to see both versions aligned, or Unified to read changes top to bottom like a git diff.
- Use Ignore whitespace when only indentation or spacing changed (for example after reformatting code), and Ignore case for case-insensitive comparisons.
- Switch the highlight between Words and Characters. Words is easier to read for prose; Characters catches single-character changes such as a changed digit or punctuation.
- Keep Collapse unchanged on to hide long identical sections, and click a gap to expand it. Download .diff exports a standard unified patch that git apply and patch understand.
Examples
Spot a changed value in a config file
Original: port: 8080 level: info Modified: port: 8443 level: info
- port: 8080 + port: 8443 level: info
Only the digits that changed are highlighted inside the line.
Ignore re-indentation
Original:
if (ok) {
run();
}
Modified:
if (ok) {
run();
} With "Ignore whitespace": the two texts are identical.
How the comparison works
The tool uses the Myers difference algorithm, the same family of algorithms used by git and most version-control systems. It finds the smallest set of line insertions and deletions that turns the original into the modified text. When a removed line is directly replaced by an added line, the two are paired as a modification and compared again at word or character level, which is why you see precise highlights instead of a whole red line followed by a whole green line.
Tips for cleaner diffs
- Normalize formatting first: run JSON through a formatter (with sorted keys) or SQL through a SQL formatter before comparing, so that only meaningful changes remain.
- Line endings are normalized automatically, so files saved on Windows (CRLF) and macOS/Linux (LF) compare cleanly.
- For very long single-line texts, break them into lines first; line-based diffs are most useful when each logical item is on its own line.
- Use Swap to reverse the direction of the comparison instead of re-pasting both texts.
Frequently asked questions
Everything you need to know about this tool and data security.
What is the difference between side-by-side and unified view?
Side by side shows the original and the modified text in two aligned columns, which is easiest for reviewing edits. Unified shows a single column where removed lines are marked with - and added lines with +, the format used by git diff and code review emails.
Can I compare files instead of pasted text?
Yes. Use Open File above each panel to load any text file, such as .txt, .json, .yaml, .csv, .log or source code. The file is read locally by your browser.
What is a .diff or .patch file?
It is a plain-text description of the changes in the unified diff format. You can attach it to a ticket, send it in a review, or apply it to the original file with git apply or the patch command.
Does it work with Chinese, Japanese or other languages?
Yes. Comparison works on any Unicode text. For languages written without spaces, the Characters highlight mode gives the most precise result.
Is my data safe when using this tool?
Yes, 100% safe. This tool operates entirely inside your web browser using client-side JavaScript and WebAssembly. Your data never touches any external server.
Related Tools
Create customizable QR codes from text or URLs and export as PNG.
Calculate exact days, weekdays, weeks, and months between two dates.
Count words, characters, sentences and paragraphs as you type, with reading time, keyword density and common length limits.
Featured Projects tech-fun.net
Explore more AI & productivity tools
Nihongo GameBox
Master Japanese typing, Kana, and JLPT N5–N1 vocabulary through interactive retro arcade games.
ResumeGPT
Tailors CVs and cover letters to every job opportunity with a multi-agent LLM pipeline, job tracking, and scheduled discovery.
CollectMind
Turns your bookmarks into a searchable AI knowledge base — entirely on-device, powered by Chrome's built-in Gemini Nano.