Diff Two Strings
Highlight what changed between an original and a changed string. Runs entirely in your browser, so your data never leaves your device.
Runs on your device, nothing uploaded
0 chars · 0 lines
0 chars
Output
Highlight what changed between an original and a changed string.
Type or paste above to see the result here.
What you paste never leaves this tab
Diff Two Strings is JavaScript that your browser has already downloaded, and it does the whole job on your own machine. On a normal site, the text you paste is sent to a server that can log it, cache it or keep it. Here it is read and transformed inside this tab and nowhere else.
- No upload
- No length limit
- Works offline once loaded
- Nothing stored or logged
How to use Diff Two Strings
- 1. Paste the original and the changed string. Type or paste the first version in the Original box and the new version in the Changed box. Swap exchanges them if you entered them the other way round.
- 2. Read the highlighted diff. Removed characters are struck through on red and added characters are underlined on green, with a legend counting each. The edit count and similarity sit under the result.
- 3. Copy the changes. Copy gives a plain-text diff, a line starting with - for the original and + for the changed string, and keeps the colours when you paste into a rich editor. Copy with markers writes [-removed-] and {+added+} in one line.
When to use Diff Two Strings
Diff Two Strings highlights what changed between an original and a changed string, marking insertions and deletions visually. It gives a fast, character-level comparison when a full file diff tool would be overkill.
- Comparing two versions of a short config value. You have an old and new value for a config setting or environment variable and want to see exactly which characters changed between them before applying an update.
- Spotting a subtle typo between two similar strings. Two API keys, hashes, or identifiers look almost identical, and comparing them character by character reveals the single character where they actually differ.
- Reviewing a small copy edit. An editor changed a single sentence in a document and you want to see precisely which words were altered without scrolling through the whole file's diff.
- Checking a find-and-replace result. You ran a find-and-replace operation and want to confirm exactly what changed between the original and modified line before committing the edit elsewhere.
Examples
Compare two words
Input
kitten
Output
- kitten + sitting
Compare two config values
Input
timeout=30s retries=3
Output
- timeout=30s retries=3 + timeout=45s retries=3
About the Diff Two Strings tool
Diff Two Strings runs as plain JavaScript in your browser tab, with no server behind it. Highlight what changed between an original and a changed string. Whatever you put in stays on your device from start to finish.
The tool is part of EditSafely's String Tools section, 159 single-purpose utilities built around the same idea: open the page, get the result, keep your data to yourself.
There is nothing to configure. Provide the input and the result appears on its own. 2 worked examples further down the page show exactly what the tool produces for real inputs.
That local-first design has practical benefits beyond privacy. The tool keeps working on a flaky connection once the page has loaded, results are instant because nothing round-trips to a server, and it is safe to use with confidential material.
Frequently asked questions
Does Diff Two Strings cost anything?
Yes, it is completely free. All 2,943 tools on EditSafely work without an account, a subscription or usage limits.
Is it safe to paste sensitive or confidential data?
No data leaves your device. The whole tool is JavaScript that runs inside your browser tab, so there is no upload, no server-side processing and no log of what you did. If you disconnect from the internet after the page loads, it keeps working.
How much text can I process at once?
There is no fixed limit; your device's memory is the ceiling. Up to 10 MB the result updates as you type, after a short pause that grows with the size. Above 10 MB a Run button appears so typing stays smooth, and files open up to 50 MB. A very long result shows its first 2,000 lines on screen, while Copy and Download always include all of it.
Do I need to sign up or install anything?
Nothing to install and no account needed. Open the page in any up-to-date browser, including on a phone or tablet, and the tool is ready.
Can I save what the tool produces?
Yes. Use the download or copy controls in the output panel to keep the rendered result once it looks the way you want.