Compare Text Instantly, No Upload Needed
I just launched Text Diff Tool on devnestio — a free, browser-based diff tool that compares two texts with no server uploads.
🔗 Try it now → text-diff-tool-1ia.pages.dev
Features
- 3 diff modes: Line, Word, or Character-level granularity
- 2 view modes: Split (side-by-side) or Unified
- Inline change highlighting within modified lines
- Line numbers with +added / −removed counts
- Auto-diffs as you type (debounced)
- Swap & Clear buttons
- Works with code, prose, JSON, configs — anything text
How it works
The core is an LCS (Longest Common Subsequence) algorithm implemented in pure Vanilla JS:
function lcs(a, b) {
const dp = Array.from({length: a.length+1}, () => new Array(b.length+1).fill(0));
for (let i = 1; i <= a.length; i++)
for (let j = 1; j <= b.length; j++)
dp[i][j] = a[i-1] === b[j-1] ? dp[i-1][j-1]+1 : Math.max(dp[i-1][j], dp[i][j-1]);
// backtrack to build ops...
}
The same LCS engine handles all three modes — it just tokenizes differently (split by \n, by \s+, or by single character).
Use cases
- Reviewing config file changes before deploying
- Comparing API responses
- Proofreading document edits
- Spotting whitespace/tab differences
- Quick code review without a Git UI
Built with
- Pure Vanilla JS — zero dependencies
- Single HTML file, fully offline-capable
- Deployed on Cloudflare Pages
Part of the devnestio collection of free developer micro-tools.
Top comments (1)
Hi! If you're based in South Africa and open to remote project collaborations, I'd love to discuss an opportunity with an American development team. If you're interested, please reply or send me a message.
Thanks.