Text & Regex
Text Diff
Paste two versions of any text or code and instantly see what changed — added and removed
lines with inline highlights inside modified lines. Copy a unified diff or download it as a
.diff file. Everything runs locally; your text never leaves the page.
Compare
liveOne version per box. The differences appear below and update as you type.
Differences
no changesHow it works
Both texts are split into lines and compared with a longest-common-subsequence diff, so unchanged lines stay in place while added and removed lines are marked. Within a changed line, words are compared again to highlight exactly which parts differ. The copy and download buttons produce a standard unified diff. All processing happens in your browser — nothing is uploaded.
Practical uses
Compare two blocks of text line by line with inline word highlights and emit a unified diff.
Common ways to use it
- See what changed between two versions of a config or code file.
- Produce a unified diff to paste into a patch, issue, or review comment.
- Review edits while ignoring letter case, whitespace, or blank lines.
Bundled config comparison
Input
Original:
const config = {
host: "localhost",
port: 8080,
debug: true,
retries: 2
};
Changed:
const config = {
host: "0.0.0.0",
port: 8080,
debug: false,
timeout: 30,
retries: 3
};Output
--- original
+++ changed
@@ -1,6 +1,7 @@
const config = {
- host: "localhost",
+ host: "0.0.0.0",
port: 8080,
- debug: true,
- retries: 2
+ debug: false,
+ timeout: 30,
+ retries: 3
};With every option off. The summary is 4 lines added, 3 lines removed, 3 lines changed and 3 unchanged. Modified lines are additionally paired and highlighted word by word, for example "localhost" removed and "0.0.0.0" added on the host line.
Options that matter
- Ignore case — compare lines and inline words case-insensitively.
- Ignore whitespace — collapse runs of spaces and tabs before comparing.
- Ignore blank lines — drop blank lines from both sides before comparing.
- View — side by side or unified; Copy and Download always output the unified diff.
Things to keep in mind
- Above the internal cell budget the line diff falls back to a linear alignment, so pairing of changed lines can be less precise on very large inputs.
- The unified header is fixed as "--- original" and "+++ changed"; there are no file names or timestamps.
- Ignore case and ignore whitespace change how lines and inline words are matched, but the displayed text is still the original text.
- Comparison runs in the browser; neither version is uploaded.