Diff Viewer
Compare two texts or files online and instantly spot every change, line by line or word by word. Review a pull request diff, catch a whitespace-only edit, or check what changed between two versions of a config file or document.
Enter both texts to see the diff result here.
Usage examples
Comparing two versions of a document
Paste in a contract or proposal before and after edits to see exactly which lines changed, at a glance.
Reviewing changes to a config file
Compare the old and new versions of a config file before deploying, to confirm only the intended values changed.
Comparing a sentence before and after editing
Switch to word-level comparison to pinpoint exactly which words changed within a long paragraph.
Reviewing a pull request diff outside of GitHub
Paste the old and new contents of a function into the two boxes and pick its language from the dropdown to get a syntax-highlighted, side-by-side-style view when you just want a quick read without opening a full PR.
Spotting an accidental whitespace-only change
A teammate's editor silently converted tabs to spaces across a file? Paste both versions in line mode to see exactly which lines differ only in whitespace, rather than guessing from a noisy editor diff.
Frequently asked questions
Is the text I enter sent to a server?
No. Comparison happens entirely in your browser, and what you enter is never sent to a server.
What's the difference between line and word comparison?
Line mode marks an entire changed line as added/removed. Word mode is more granular, showing exactly which words within a line changed.
Can I upload files directly?
No, you paste the content you want to compare into each text box. You can copy content from most text or code editors and paste it in.
Is what I type saved anywhere?
It's kept only in your browser's local storage so it's still there if you come back later. It's never sent to a server.
What happens when I select a programming language?
The diff result is colored according to that language's syntax — keywords, strings, comments, numbers, and so on — making code easier to read while comparing. The comparison itself works the same as plain text; the language choice only affects how the result is displayed.
Does it ignore whitespace-only differences, like trailing spaces or indentation?
No, whitespace is significant. A line that only changed by a trailing space, an extra tab, or re-indentation will still show up as removed-and-added, since the comparison looks at the exact text content. This is useful for catching exactly these kinds of unintended whitespace changes.
What about different line endings, like CRLF versus LF?
Different line endings are treated as a real difference, since they change the underlying text even if the content looks identical when rendered. If you're comparing files from Windows and Unix/macOS sources and only care about content, normalize line endings in one of them first.
Will it slow down or freeze on very large documents?
The diff algorithm runs synchronously in your browser's main thread, so extremely large inputs — tens of thousands of lines or more, especially in word mode — can take a noticeable moment or momentarily make the page feel unresponsive. For typical files, config diffs, or paragraphs of text it's effectively instant.