Diff Checker

Compare two texts side by side with highlighted changes, or as words, characters, and semantic JSON or YAML.

5 lines, 126 characters

6 lines, 140 characters

Example input
Compare by
Highlight inside lines

3 additions, 2 deletions (2 lines edited in place) in 2 changes

0 of 2
1
server_name api.example.com;
1
server_name api.example.com;
2
listen 443 ssl;
2
listen 443 ssl;
3
ssl_certificate /etc/ssl/certs/api.crt;
3
ssl_certificate /etc/ssl/certs/api-2024.crt;
4
worker_processes 4;
4
worker_processes 8;
5
keepalive_timeout 65;
5
keepalive_timeout 65;
6
gzip on;

Step through changes with Alt + Down and Alt + Up. The patch is always exact: it ignores the ignore switches.

Related tools

What it does

Compares two pieces of text and shows exactly what changed. The original and the changed text each get their own box, and the result is a real diff: side by side or unified, with line numbers, tinted added and removed lines, highlights on the words or characters that changed inside a line, and long unchanged stretches folded away. Word and character modes mark insertions and deletions in flowing prose, and JSON or YAML mode parses both sides and reports differences by path instead of raw text noise.

How to use it

Paste, type, or drop a file into the Original box and the Changed box; the comparison updates as you type. Pick what to compare by, switch between the side by side and unified layouts, and use the ignore switches for whitespace, case, and blank lines. Step through changes with the arrow buttons or Alt plus Down and Up, then copy the result as a standard unified patch or download it as a .patch file.

Why this one

Most online diff tools upload both documents to a server, cap how much text you can paste, and put the useful views behind an account. This one runs entirely in your browser: your files and inputs never leave your device, there is no size cap beyond what your browser can hold, and the patch it produces is byte exact, so patch and git apply accept it.

FAQ
Can I use the patch with git apply or patch?
Yes. Copy patch and Download .patch produce a standard unified diff with the usual header lines, hunk headers, and the marker for a missing final newline. The patch is always exact: it records every changed line, including whitespace, case, and line ending changes, even when the ignore switches are hiding those in the view.
What does semantic JSON or YAML mode mean?
Instead of diffing raw text, it parses both sides and compares the resulting values by path. A key that just moved position or a value reformatted with different spacing is not reported as a change, only values that actually differ are.
Is my text uploaded anywhere?
No. Your files and inputs never leave your device. The comparison runs locally in your browser. A share link keeps short texts in the part of the address after the # sign, which browsers do not send to any server, and long texts are left out of the link entirely.

Keyboard shortcuts: press ? anywhere on this page to see them.