Category · 1 tool · 1 guide
Developer text tools
A surprising amount of development work is just handling text: config values copied between environments, log excerpts, API responses before and after a change, SQL from two branches, a contract file a customer edited. Before you can decide anything you need to know exactly what is different, and scanning two long blocks by eye is unreliable.
Git shows diffs for files under version control, but much of the text you compare never gets near a repository. It lives in tickets, chat messages, terminal output and browser tabs. A quick diff tool closes that gap, and options such as ignoring whitespace or case let you separate meaningful changes from noise like reindentation or line-ending differences.
The tools in this category work on any plain text, from a single line to thousands of lines, and highlight changes down to the word. Everything is computed in your browser, so private logs and configuration stay on your machine.
Tools in this category
Common tasks
- Compare config between environmentsDiff staging and production settings to find the one value that explains different behaviour.
- Learn to read a unified diffUnderstand hunks, @@ headers and plus and minus lines, and how diff algorithms choose what changed.
- Compare two API responsesFormat both JSON payloads with sorted keys first, so the diff shows real changes, not key order.
- Check a regex replacementRun a search-and-replace, then diff the result against the original to confirm the scope.
- See what a git command changedFind the right git diff or restore command for comparing commits, branches or staged files.
Key concepts
- Longest common subsequence
- The classic basis of diff algorithms: find the longest sequence of lines that appears in both texts in order. Everything outside it is reported as added or removed.
- Unified diff
- The format used by git and patch. Lines starting with - were removed, + were added, and a space means unchanged context. @@ headers give the line numbers of each hunk.
- Line endings
- Windows uses CRLF (\r\n) and Unix uses LF (\n). Text copied between systems can differ on every line even though it looks identical.
- Whitespace-insensitive diff
- Ignoring spaces and tabs hides reindentation and alignment changes so you can focus on content. It is the same idea as git diff -w.
- Word-level diff
- Highlighting the changed words inside a modified line, rather than marking the whole line, makes small edits in long lines easy to spot.
Best practices
- Normalise formatting before comparing structured data: same indentation, sorted keys and the same line endings.
- Use whitespace-insensitive mode for code reviews of reformatted files, then switch it off to check indentation-sensitive files like YAML.
- Keep the "before" text on the left and the "after" text on the right so removals and additions read naturally.
- Configure .gitattributes for consistent line endings in repositories shared between Windows and Unix machines.
- Redact secrets before pasting text into any shared diff or ticket, even when the tool itself is local.