5 lines, 126 characters
6 lines, 140 characters
3 additions, 2 deletions (2 lines edited in place) in 2 changes
Step through changes with Alt + Down and Alt + Up. The patch is always exact: it ignores the ignore switches.
Related tools
- JSON Formatter and ValidatorFormat, minify, validate and repair JSON with exact error positions, a searchable tree view and key sorting. Also decodes JWTs, base64 and URL encoding.
- Data Format ConverterConvert data between CSV, JSON, YAML, and TOML in any direction, auto detecting the source format from what you paste.
- CSV ViewerOpen CSV and TSV files as a sortable, filterable table with column stats and clean exports.
- Parquet ViewerOpen a Parquet file and read its schema, row counts and data in your browser.
- XLSX ViewerOpen, sort and filter Excel spreadsheets without uploading them anywhere.
- Binary Format DecoderDecode protobuf, CBOR, and msgpack payloads to readable JSON in your browser.
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.