Diff Checker & Text Compare
Compare two texts side by side or unified — spot every addition, deletion, and change instantly and privately.
Line, word & char diff
Choose the right granularity for your text. Line mode for code, word mode for prose, character mode for short strings.
Intra-line highlighting
See exactly which characters changed inside a modified line. No more hunting for a single character in a sea of green or red.
Private by design
Everything happens in your browser. Your text is never uploaded, logged, or stored on any server.
How the diff checker works
The tool splits both texts into tokens — lines, words, or characters depending on the mode you select — and runs a longest-common- subsequence (LCS) algorithm to find the minimal set of insertions, deletions, and replacements that transforms the original into the modified text.
In Split view the left column shows the original with removed lines highlighted in red, and the right column shows the modified version with added lines highlighted in green. In Unified view the two are merged into a single column with +, −, and space prefixes, exactly like a Git diff.
Typical use cases
- Comparing two versions of a configuration file before deployment.
- Reviewing a pull request diff without opening an IDE.
- Spotting accidental changes in a pasted code snippet.
- Proofreading by comparing an original draft against a revision.
- Checking if two API responses differ after a backend update.
Frequently asked questions
›What is a diff checker?
A diff checker (or text compare tool) shows the differences between two pieces of text. It highlights lines or words that have been added, removed, or changed, making it easy to spot what changed between two versions of a file, document, or code snippet.
›Is this diff checker private?
Yes. All comparison happens locally in your browser. Your text is never sent to a server, logged, or stored. You can safely compare sensitive data such as API responses, configuration files, or personal documents.
›What diff modes are available?
The tool supports three diff modes: Lines (best for code and structured text), Words (good for prose and natural language), and Characters (finest granularity for short strings). Choose the mode that best suits the type of text you are comparing.
›What is the difference between Split and Unified view?
Split view shows the original text on the left and the modified text on the right, side by side. Unified view stacks additions and deletions into a single column with line numbers, similar to the output of the `git diff` command.
›What does 'Ignore whitespace' do?
When enabled, the diff algorithm ignores spaces, tabs, and line breaks when matching tokens. This is useful when you want to compare the semantic content without flagging formatting-only changes such as re-indentation or trailing spaces.
›What are intra-line highlights?
When comparing line-by-line, the tool can also show exactly which characters changed within a modified line. Added characters are highlighted in green; removed characters are highlighted in red. This is especially helpful for spotting tiny edits in long lines.
›Can I copy or download the diff?
Yes. In line mode, you can copy the unified diff to your clipboard or download it as a plain text file. The output follows a standard unified diff format with +, -, and space prefixes, compatible with tools like Git and patch.
›How large can the files be?
The tool runs entirely in your browser, so the limit depends on your device's memory. It handles thousands of lines comfortably. For multi-megabyte files, a command-line tool such as `diff` or a specialized desktop diff viewer may be more appropriate.
›Can I swap the left and right sides?
Yes. Click the Swap button to exchange the original and modified texts instantly. This is useful when you pasted them in the wrong order or want to see the inverse perspective of the changes.
›Does it work with any text format?
Yes. The diff checker treats input as plain text, so it works with any format: source code, JSON, XML, CSV, Markdown, configuration files, prose, and more. For semantic comparison of structured data, use the JSON Diff tool instead.
More free developer tools
Part of our growing tool belt — all client-side, all free.
JWT Encoder & Token Generator
Generate and sign JSON Web Tokens (HS256/384/512) locally in your browser.
Open toolRegex Generator
Build regular expressions visually with blocks, quantifiers, presets, and live match preview — all in your browser.
Open toolRegex Tester & Debugger
Test regular expressions with real-time match highlighting, capture groups, and replacement preview — all in your browser.
Open tool