Normalize only when it matches the question
A diff can answer different questions depending on whether whitespace, casing, sorting, or punctuation matters. Decide whether the review is about exact bytes, visible text, config semantics, or human-readable copy before comparing.
- Use exact line diff for code and config changes.
- Use word diff for prose revisions.
- Sort and dedupe only when order is not meaningful.
Compare small slices first
Large pasted logs or generated files can hide the important change. Trim the input to the function, object, query, or paragraph that changed, then expand the diff only if context is missing.
- Remove unrelated timestamps when checking log messages.
- Keep surrounding braces for JSON or code snippets.
- Compare generated output after formatting both sides consistently.
Use diff to protect meaning
Formatting, minification, and cleanup tools can change text in ways that look harmless. A quick diff helps confirm whether only whitespace changed or whether a selector, query condition, token, or data field moved.
- Diff SQL before running a reformatted query.
- Diff CSS after minification when comments or hacks matter.
- Diff JSON after conversion when arrays or null values are important.
Keep sensitive context out of comparisons
Diffs are often copied into pull requests, tickets, and chats. Redact secrets, private hostnames, customer rows, and one-off production identifiers before creating a shareable comparison.
- Replace tokens with stable placeholders.
- Keep line counts and structure after redaction when possible.
- Avoid screenshotting unredacted side-by-side diffs.
Turn the result into a decision
A useful diff ends with a clear next action: accept the copy change, reject a risky config change, rerun a formatter, or inspect a specific field. Use related tools when the diff shows a type-specific issue.
- Use JSON Formatter for changed payload fields.
- Use Text Sort and Dedupe for unordered lists.
- Use Word Character Counter for length-sensitive copy.