Text Diff & Compare
Crisp side-by-side or inline diff for code, copy & scripts.
Compare two texts and see every change. Free online diff tool for code, copy & scripts — side-by-side or inline, right in your browser. Nothing uploaded…
About Text Diff & Compare
Text Diff & Compare is a free, in-browser tool that highlights every difference between two blocks of text or code, with side-by-side, inline, or unified views at line, word, or character granularity. It is built for comparing code, copy, configs, and scripts, and reports additions, deletions, and a similarity score. Everything runs locally in your browser, with no signup and no upload, so the text you paste or drop never leaves your device.
How to use Text Diff & Compare
- Paste your original text on the left and the changed version on the right, or drag a text file (up to 10 MB) onto either box. Optionally name each side with a label.
- Pick a view: Side by side, Inline, or Unified. Side-by-side also highlights the exact characters that changed within modified lines.
- Choose the comparison granularity, Lines, Words, or Chars, to control how finely differences are detected.
- Toggle Ignore case, Ignore whitespace, or Trim lines to suppress cosmetic differences you do not care about.
- Read the stats bar for additions, deletions, unchanged count, and an overall similarity percentage.
- Click Copy unified to export a standard unified-diff (with --- / +++ labels and +/- markers), or use the local AI button to draft a Conventional-Commit message summarizing the change.
Frequently asked questions
- Is Text Diff & Compare free?
- Yes, it is completely free with no signup, no account, and no usage limits.
- Are my files or text uploaded to a server?
- No. Everything runs locally in your browser using the jsdiff comparison engine. Pasted text and dropped files are read on your device and never leave it.
- What is the difference between Lines, Words, and Chars granularity?
- Lines compares text one line at a time, Words breaks each change down to individual words, and Chars compares character by character. Use a finer granularity when you need to pinpoint small edits inside a line.
- Can I ignore whitespace or capitalization differences?
- Yes. Three toggles let you ignore case, collapse runs of spaces and tabs (ignore whitespace), and trim leading and trailing whitespace on each line before comparing.
- Can I export the diff?
- Yes. Click Copy unified to copy a standard unified-diff to your clipboard, including --- and +++ header lines (with your optional labels) and +/- line markers, ready to paste into a patch or a code review.
- What does the AI commit-message feature do, and is it private?
- It uses a local AI model to write a Conventional-Commit-style message summarizing the change from the original to the changed text, for code or prose. It runs in your browser, so the comparison stays private.
People also search for
Text Diff & Compare is also known as text diff compare, compare two text files, diff compare tool, compare text online, find differences between text, diff two files, side by side text comparison.