Diff Viewer
Compare two texts or code snippets side by side with line-level difference highlighting.
Prefer the terminal? See the CLI equivalent →About the Diff Viewer
- Side-by-side & inline diff
- Syntax highlighting
- Compare text or uploaded files
- Instant results
- 100% private — runs in your browser
- Free, no sign-up
A diff shows exactly what changed between two versions of a piece of text: which lines were added, which were removed, and which stayed the same. It is the same view you see in a code review or a version-control history, and it is invaluable any time you need to answer “what is different here?” — comparing two config files, checking an edit before you save it, or spotting an unexpected change in an API response.
This viewer compares two editable panes side by side and highlights the differences line by line. Both sides accept pasted text or a dropped file, and the diff recomputes live as you edit. You can switch between a side-by-side layout and a unified inline view, ignore whitespace-only changes to cut through noise, and turn on syntax highlighting for the language you are comparing.
Everything is computed locally in your browser, so you can compare private code, credentials, or internal documents without any of it being uploaded.
How to use it
- Paste your original content into the left pane and the modified version into the right — or drag and drop a file onto either side.
- Read the highlighted differences: removed lines are marked on the left, added lines on the right. Copy either side, or fullscreen the diff, from the editor toolbar.
- Toggle side-by-side or inline view depending on how you prefer to read the changes.
- Enable “ignore whitespace” to hide indentation-only differences, and pick a language for syntax highlighting when comparing code.
Frequently asked questions
What kinds of text can I compare?+
Anything text-based — source code, JSON or YAML config, logs, prose, CSV. Choose a language to get syntax highlighting, or leave it as plain text.
Can I compare two files?+
Yes. Drag and drop a file onto either pane and its contents load automatically. You can mix and match — for example, drop a file on one side and paste text on the other.
What does “ignore whitespace” do?+
It treats lines that differ only in spaces, tabs, or trailing whitespace as unchanged, so reformatting or indentation changes do not clutter the diff. Turn it off when whitespace actually matters, such as in whitespace-sensitive languages.
Is my content uploaded anywhere?+
No. The comparison runs entirely in your browser. Nothing you paste or drop is sent to a server, which makes it safe for comparing sensitive files.
What is the difference between side-by-side and inline view?+
Side-by-side places the two versions in adjacent columns, which is best for reading larger blocks. Inline (unified) view interleaves added and removed lines in a single column, like a patch file — compact and closer to what version-control tools show.
Works well with
Diff Viewer chains with these tools — send your result straight on:
Related tools
Case Converter
Convert text between camelCase, PascalCase, snake_case, CONSTANT_CASE, kebab-case, Title Case, and more — all at once, in your browser.
Image to Text (OCR)
Extract the text from a screenshot, photo, or scanned document with OCR — in 18 languages, entirely in your browser. Nothing is uploaded.
Markdown Editor
Write Markdown with a live GitHub-flavored preview, a table of contents, and one-click export to Markdown or HTML — entirely in your browser, nothing uploaded.
Mojibake Fixer
Repair garbled text where UTF-8 was misread as Windows-1252 — turn “café” back into “café” and “’” back into “’”. Runs entirely in your browser.
Regex Railroad Diagram
Visualize a regular expression as a railroad diagram and read a plain-English, step-by-step explanation. Hover to link the two. Runs in your browser.
Regex Sample Generator
Generate example strings that match a regular expression, then send them straight into the Regex Tester. Every sample is verified to match — all in your browser.