Code Compare (Diff)
Your data never leaves your browserCompare two code snippets or text files and highlight the differences.
Paste or type content into both panels to see the diff.
Brie — Bug Reporting Tool
Comparing expected vs. actual output?
Brie captures the before and after with session replay, so your team can see exactly what changed and when.
About Code Compare (Diff)
Paste any two code snippets or text files into the side-by-side panels and instantly see every added, removed, and unchanged line highlighted in color. Supports any programming language and plain text. Options to ignore whitespace and perform case-insensitive comparisons. All diffing is done locally in your browser — your code never leaves your device.
How to use
- Paste your original code or text into the left panel.
- Paste the modified version into the right panel.
- The diff output appears below with green lines for additions and red strikethrough lines for deletions.
More Comparison / Diff Tools
Frequently Asked Questions
FAQs about Code Compare (Diff)
What languages does Code Compare support?
Code Compare works with any plain-text format including JavaScript, TypeScript, Python, Java, Go, Ruby, C, C++, CSS, HTML, SQL, YAML, and more. It performs line-based diffing without language-specific parsing.
How does the diff algorithm work?
The tool uses a Longest Common Subsequence (LCS) algorithm to compute the minimal edit difference between the two inputs, accurately identifying which lines were added, removed, or unchanged.
What does "Ignore whitespace" do?
When enabled, leading, trailing, and repeated whitespace within each line is normalized before comparison. This prevents cosmetic formatting changes (like extra spaces or tab vs. space indentation) from showing as differences.
Is my code sent to a server?
No. All diffing happens entirely in your browser using JavaScript. Your code never leaves your device.
Can I upload files instead of pasting?
Yes. Click the Upload button on either panel to upload a text file (.txt, .js, .ts, .json, .html, .css, .xml, .yaml, etc.) directly from your computer.