Text Diff / Compare
Paste two versions of a text, config file or code snippet. Added lines show in green and removed lines in red, with the exact characters that changed highlighted.
Original
Changed
Differences
Paste text on both sides to compare.
How this diff works
The tool compares the two texts line by line using the Myers diff algorithm, the same approach git diff uses. It finds the smallest set of added and removed lines that turns the original into the changed version. When a removed line is directly replaced by an added one, it's shown as a modified line, and the characters that changed inside it are highlighted.
Side by side or unified?
Side by side puts the two versions in columns, which is easiest for reading prose and config files. Unified shows one column with - and + markers, like a patch or a pull request, and works better on narrow screens.
Tips
- Ignore whitespace hides changes that are only re-indentation or trailing spaces, which is handy after running a code formatter.
- Hide unchanged collapses long identical stretches to 3 lines of context. Click a collapsed row to expand it.
- Comparing JSON? The JSON Diff tool ignores key order and formatting and matches array items by id, so it only shows real changes.
- Everything runs in your browser, so it's safe to compare private configs and logs.