Text Diff
Visually display differences between two texts. Enter text in the left and right text areas or load from files to see added lines (green), removed lines (red), and modified lines highlighted in different colors.
Left text
Right text
Enter text in the left and right text areas to display differences
How to use
About this tool
Shows the diff between two texts with added, removed, and changed parts highlighted.
How to use
Enter both texts in the left and right panels; diff updates in real time; line numbers and wrap optional.
Options
Show line numbers: on/off. Wrap at right edge: on/off. When wrap is on, long lines break in the view and line numbers are shown per line.
Use cases
• Code/config changes • Pre-merge review • Proofreading • Contract versions
Privacy and data
Diff is computed in-browser; text is not sent to a server.
FAQ
- Q: How does the diff algorithm work?
- A: The tool uses a line-by-line diff algorithm (similar to the Unix diff command) to compare the left and right texts. Added lines are highlighted in green, removed lines in red, and unchanged lines are shown normally.
- Q: Can I compare code files, not just plain text?
- A: Yes. Paste any text content — source code, configuration files, JSON, SQL, Markdown, or prose. The tool treats all input as plain text and highlights line-level changes.
- Q: What do the "Show line numbers" and "Wrap" options do?
- A: "Show line numbers" adds line numbers to the left margin for easy reference. "Wrap" breaks long lines at the panel edge so you can see the full content without horizontal scrolling.
- Q: Is there a size limit on the text I can compare?
- A: There is no enforced limit. Very large texts (tens of thousands of lines) may slow down the live diff render, but the result will still be computed correctly.
- Q: Does this tool send my text to a server?
- A: No. The diff is computed entirely in the browser. Your text is never sent to any server.
