tool
Diff Checker
Paste the original on the left and the updated version on the right. The comparison updates as you type.
paste something on both sides to see the diff
Compare two texts and see exactly what changed
Paste the original version on the left and the changed version on the right. The diff checker compares them line by line and marks every line that was added, removed or left unchanged, with line numbers from both versions and a running count of changes. It works for source code, configuration files, JSON, SQL, Markdown, contracts or any plain text, and the comparison runs entirely in your browser.
What can you do?
- 1. Line-by-line comparison
Added lines are marked in green and removed lines in red, with unchanged lines shown for context. The diff updates instantly as you type or paste. - 2. Ignore whitespace changes
Turn on ignore whitespace to treat lines as equal when they differ only in indentation, extra spaces or trailing spaces, which is perfect after re-formatting code. - 3. Swap the two sides
Reverse the comparison in one click to see the change from the other direction. - 4. Copy the diff
Copy the result as plain text with + and - markers, ready to paste into a chat, a ticket or a code review comment.
When is a diff checker useful?
Version control shows diffs for files in a repository, but plenty of text lives outside Git: a config copied from a server, two API responses, an email template edited by a colleague, a contract revision or a SQL query someone tweaked. Comparing them by eye is slow and unreliable, especially when only one character changed.
A diff checker answers the question “what's different?” immediately and gives you something concrete to share, so nobody has to send two full copies of a file and ask the other person to spot the change.
How to compare two texts
- 1. Paste the original
Put the older or reference version in the left editor. - 2. Paste the changed version
Put the newer version in the right editor. The diff appears immediately. - 3. Decide about whitespace
If the files were re-indented or reformatted, turn on ignore whitespace so only meaningful changes remain. - 4. Review and copy
Scan the highlighted lines and use the counters to see how many lines were added and removed, then copy the diff if you need to share it.
How to read the diff output
| Marker | Meaning | Line numbers shown |
|---|---|---|
+ | Line exists only in the changed (right) version | New version only |
- | Line exists only in the original (left) version | Original version only |
| (no marker) | Line is identical in both versions | Both versions |
Because the comparison works on whole lines, a line where a single word changed appears as one removed line followed by one added line. Read the pair together to spot the edit.
Should you ignore whitespace?
| Situation | Ignore whitespace | Why |
|---|---|---|
| Code re-indented or auto-formatted | On | Hides hundreds of indentation-only changes. |
| Tabs replaced with spaces | On | The content is the same; only the spacing differs. |
| Comparing prose or contracts | On | Double spaces rarely matter in documents. |
| Python, YAML or Makefiles | Off | Indentation changes the meaning of the code. |
| Markdown with intentional line breaks | Off | Trailing spaces can create line breaks. |
Tips for cleaner comparisons
- Format JSON before comparing
Minified JSON sits on a single line, so any change marks the whole document as different. Run both versions through the JSON formatter first to get one property per line and a precise diff. - Beautify minified code first
The same applies to CSS, JavaScript and HTML. Format both versions with the CSS, JavaScript or HTML formatter so changes are isolated to the lines that actually differ. - Keep line order stable
If one file is sorted differently, every moved line appears as a removal and an addition. Sort both versions the same way when order doesn't matter.
Frequently asked questions
Is this the same as git diff?
It uses the same idea and the same + and - markers, so the output will feel familiar. Unlike git diff, the copied output includes every line rather than short hunks of surrounding context, and you don't need a repository.
Does it highlight changes within a line?
No. Changes are detected per line. When a line was edited, you'll see the old version marked as removed and the new version marked as added, one after the other.
How large can the texts be?
It comfortably handles files up to a few thousand lines. Much larger inputs still work but can take noticeably longer, because every line of one version is compared against every line of the other.
Can I compare Word documents or PDFs?
Copy the text out of the document and paste it in. The tool compares plain text, so formatting such as bold, colours or layout isn't included in the comparison.
Is the text I compare sent anywhere?
No. Both versions stay in your browser and are not uploaded or saved, which makes it suitable for private configuration and code.
Related tools
- JSON Formatter & Validator – Pretty-print, validate and minify JSON.
- JavaScript Formatter & Validator – Format, lint and minify JavaScript snippets.
- CSS Formatter, Validator & Minifier – Beautify, validate and minify stylesheets.
- HTML Formatter, Validator & Minifier – Indent markup, catch structural errors and compact HTML.
- Regex Tester – Test JavaScript regular expressions with live highlighting.