Code diff
Compare two versions of a file in any programming language to spot edited lines before a commit, review a refactor, or find the change that broke something.
Paste or upload two versions of a text and see every added, removed and changed line in seconds - without your data ever leaving your browser.
The comparison runs entirely in your browser. Your text is not uploaded or logged; one restore session may be kept locally on your device.
An optimized Myers algorithm highlights line, word and character changes in milliseconds.
Unlimited comparisons for text, code and config files. No account, no installation.
Put the original text in the left editor and the changed text in the right editor. You can paste from the clipboard or upload plain-text files.
The diff is computed instantly on your device. Choose smart, word or character precision for the inline highlights.
Removed lines are marked red, added lines green, and changed lines show exactly what was edited. Switch between split and unified views, or hide unchanged lines.
Many online comparison tools send your content to a server to compute the diff. This tool does not: the comparison runs locally in your browser using JavaScript, so your text is not transmitted to our servers or shared.
That makes it suitable for sensitive content such as contracts, source code, configuration files and personal documents. To recover from accidental reloads, one recent session can be stored locally in your browser and cleared from the tool or browser settings.
Anything that is plain text can be diffed - here are the most common uses:
Compare two versions of a file in any programming language to spot edited lines before a commit, review a refactor, or find the change that broke something.
Check two drafts of an article, essay or contract for edits, and verify that nothing important was added or removed between versions.
Diff environment files, JSON or YAML configuration and log output to track down what changed between two deployments or runs.
The tool compares any plain-text content. Upload or paste files such as:
.txt, .md, .csv, .json, .xml, .yml, .html, .css, .js, .ts, .jsx, .tsx, .py, .r, .java, .c, .cpp, .go, .rs, .rb, .php, .sql, .sh, .ini, .env, .log
Binary formats such as PDF, Word documents or images are not supported in this version.
No. The comparison runs entirely in your browser. You can verify this in your browser's developer tools: no network requests are made when you click Compare.
Paste both versions into the editors, or use the upload buttons to load plain-text files from your device, then click Compare. Differences are highlighted immediately.
Yes. The diff works line by line and highlights inline changes, which makes it well suited for code in any language, as well as JSON, YAML and other configs.
Red marks lines or characters that were removed from the original text, and green marks content that was added in the changed text. A line shown in both colors was modified.
There is no hard limit, but very large inputs (several megabytes) can be slow because the comparison runs on your device. The tool warns you when input is large.
Yes. Comparing text is free and unlimited - no account, subscription or installation required.