Compare two blocks of text

Paste the original and the changed text side by side. See added, removed, and modified lines with character-level highlighting on changed lines.

Drop your file here

or click to browse

All files • or paste with ⌘V
Nothing has left this page since you opened the tool. Show network activity

    The browser enforces this: the site’s security policy only lets the page talk to the code libraries’ servers and an anonymous usage counter (tool name, file type, size range). A request carrying your file to anywhere else would be blocked before it left.

    Check it yourself: open your browser’s developer tools, go to the Network tab, and run the tool. Or turn off Wi-Fi once the tool has loaded; it keeps working.

    How it works

    Paste the original and the changed text side by side. See added, removed, and modified lines with character-level highlighting on changed lines.

    The tool runs a longest-common-subsequence diff at the line level, then pairs up modified lines and runs a second character-level diff inside each pair. Equal lines show in both columns. Added lines (in the right column only) are highlighted green with a + marker. Removed lines (in the left column only) are red with a - marker. Modified lines show side by side with the changed characters within each line highlighted. Stats at the top: added, removed, changed, unchanged. Useful for proof-reading edits, comparing config files, spotting what changed in a contract, or auditing a copy-paste. Pure character comparison: whitespace and case differences count as differences. Both text boxes accept any size of input (within memory limits).

    How to use it

    1. Paste the original text. Put the before version in the left box.
    2. Paste the changed text. Put the after version in the right box.
    3. Read the diff. Added lines show green, removed lines red, and modified lines highlight the exact changed characters.
    4. Check the stats. The counters at the top total the added, removed, changed, and unchanged lines.

    Frequently asked questions

    Does whitespace count as a difference?
    Yes. Extra spaces, trailing whitespace, and tab vs space all show up as differences.
    Is the comparison case-sensitive?
    Yes. "Hello" and "hello" diff as a change. There's no ignore-case toggle in this version.
    Can I compare two files?
    Not directly. Open each file in another tool, copy its contents, paste into the two boxes.
    Is the text uploaded?
    No. The diff runs entirely in your browser.
    Saved