Text Diff Tool — Compare Two Texts Side by Side in Your Browser
Compare two versions of any text, code, or document and see exactly what changed. Works offline in your browser — your content is never uploaded to any server.
Comparing two versions of text — whether it’s code, prose, configuration files, or documents — is a daily task for developers, writers, and editors. SimpleTools Text Diff shows you exactly what changed between two texts with colour-coded line and character highlighting, entirely in your browser.
What Is a Text Diff?
A diff (short for “difference”) is a representation of the changes between two pieces of text. Lines are categorised as:
- Added (highlighted green) — present in the new version, not in the old
- Removed (highlighted red) — present in the old version, not in the new
- Unchanged — identical in both versions
Diffs are used by version control systems (Git, SVN), code review tools (GitHub PRs), and document comparison tools (Google Docs “suggest edits” mode).
Diff Modes
- Line-by-line diff: Standard diff output — each changed line shown in context
- Side-by-side diff: Old text on the left, new text on the right, with changes aligned horizontally
- Inline diff: Word-level or character-level highlighting within changed lines — see exactly which words were added, removed, or changed, not just which lines
- Unified diff format: Git-compatible output with
+and-line prefixes
Privacy Matters for Text Comparison
Text you’re comparing might include:
- Code with API keys or credentials copied from a config file
- Legal document drafts before they’re finalised
- Email drafts with sensitive content
- Database migration scripts revealing schema structure
Uploading this text to a cloud-based diff tool means it passes through someone else’s servers.
✅ Your text never leaves your browser
✅ Works offline — compare texts without internet
✅ No character or file size limits
✅ No account required
How It Works
The tool uses a JavaScript implementation of the Myers diff algorithm — the same algorithm used by Git and most version control systems. The algorithm finds the longest common subsequence (LCS) of the two texts, and from that determines the minimal set of additions and deletions needed to transform one text into the other.
// Simplified: finds the edit distance and operations
const diff = computeMyersDiff(oldLines, newLines);
// Returns operations: [{ type: 'equal'|'insert'|'delete', lines: [...] }]The character-level inline diff applies the same algorithm at a word/character level to highlight fine-grained changes within individual lines.
How to Use Text Diff
- Visit simpletools.one/text-diff
- Paste your original text in the left panel
- Paste your modified text in the right panel
- The diff appears immediately below (or updates in real time as you type)
- Toggle between side-by-side and unified view modes
- Toggle character-level diff for fine-grained highlighting
- Use the copy diff button to copy the unified diff format
Common Use Cases
Code review without Git: Compare a colleague’s version of a function with yours to spot differences before formally diffing in Git.
Document editing: Compare a document before and after editing to review the full scope of changes.
Configuration file comparison: Compare two config files from different environments (staging vs. production) to find discrepancies.
API response comparison: Compare two API response payloads to see what changed between versions or environments.
Paste log output: Compare application logs from two runs to identify what’s different.
Proofreading: Paste an original text and an edited version to see every word change made.
Understanding the Output
Green lines (additions): These lines exist in the new text but not the old.
Red lines (deletions): These lines exist in the old text but not the new.
Inline highlights: Within a changed line, the specific words or characters that changed are highlighted in a darker shade.
Unchanged lines: Shown in normal text colour, providing context around the changes.
Change summary: The tool reports total additions, deletions, and the percentage of the document that changed.
Compare your texts at simpletools.one/text-diff — instant visual diffs, completely private, free forever.