Free documentation tools / Browser-local text processing
Markdown diff.
Compare two Markdown sources and see which lines were added, deleted or kept. Review line numbers, filter unchanged text, and export a readable report. Your document text is compared in this browser.
How to compare two Markdown documents
Paste the original document into Before and the revision into After, then select Compare Markdown. The report identifies added, deleted and unchanged lines, with the original and revised line numbers. Use Show changed lines only to narrow the view. Copy or download the full text report when you want to discuss the edits with another reviewer.
The comparison runs in the browser. Each side is limited to 50,000 characters and 1,000 lines. The algorithm has a fixed upper bound on its comparison matrix, so pasting a large document does not trigger an unbounded quadratic allocation. Split larger files at section boundaries and compare matching sections separately.
Changing either input clears the previous result. This avoids copying a report that belongs to an older pair of documents. Swap sides reverses the direction of the review: additions become deletions and vice versa after you compare again.
Worked example: catch a risky instruction change
Consider this original paragraph:
## Retry behavior
Retry a rate-limited request after the documented delay.
Do not retry a rejected authentication token unchanged.
Now compare it with this revision:
## Retry behavior
Retry every failed request immediately.
The revised paragraph is shorter, but brevity is not the review criterion. The diff shows the removed authentication warning and the new unconditional retry instruction. A useful review comment would ask which response classes are retryable and where the delay comes from. The tool exposes the edit; it cannot determine the API's correct retry policy.
Keep the original and revised context visible for a first pass. Then enable the changed-lines filter to check whether the deletion was intentional. If a revision combines factual changes with widespread rewrapping, review those separately where possible. Formatting-only edits can make important behavioral changes harder to spot.
What the diff compares
This is a line-by-line comparison of actual Markdown source, not a comparison of screenshots, HTML trees or natural-language meaning. A changed line normally appears as a deleted line followed by an added line. A moved paragraph may also appear as a deletion and addition; there is no special move detection or word-level highlighting.
Spaces, indentation, capitalization, URL destinations, fences and Markdown punctuation matter. For example, changing [API guide](/docs/api) to [API guide](/docs/legacy-api) changes the destination even though the visible label stays the same. A rendered preview can hide that distinction, while a source comparison exposes it.
Windows CRLF and Unix LF line endings are normalized for comparison. A final newline remains observable as a trailing empty line. No other whitespace normalization is applied. Two sources that render identically can therefore still produce a useful diff. The empty-line rows retain line numbers even when there is no visible text to highlight.
Repeated identical lines can have more than one valid alignment. The report uses a deterministic longest-common-subsequence comparison, choosing deletions first when equivalent paths tie. Line pairing is a review aid, not evidence that a sentence physically moved from one specific location to another.
A documentation review checklist
- Check claims: verify changed limits, endpoint paths, supported versions and permission requirements against the authoritative source.
- Check runnable examples: read altered flags, environment names and placeholders. A tiny source change can redirect a request or remove an important safety condition.
- Check structure: inspect heading levels, list indentation and code fences. One fence can alter the interpretation of an entire section.
- Check links: read destinations as well as labels. This diff does not fetch URLs or establish that a destination exists.
- Check the rendered result: paste the revision into the Markdown live preview, then verify it in the real publishing environment.
For table-heavy changes, the table generator can help rebuild escaped, aligned source. Compare the resulting text again before accepting the replacement. A table with identical visible values can still have a changed header or alignment row.
The exported report uses + for additions, - for deletions and a leading space for unchanged lines. It deliberately omits Git patch headers and hunk coordinates. Attach it to a discussion as a readable report; do not pass it to git apply or treat it as a version-control artifact.
Showing a diff inside a Markdown document
Comparing two sources is different from displaying a hand-written diff example. If you only want to explain an edit in a README, put the lines inside a fenced code block whose language is diff:
```diff
- Use the old endpoint.
+ Use the current endpoint.
```
A renderer with diff syntax highlighting may color those lines. The fence itself does not calculate a comparison; the author writes the markers. This tool calculates source changes from the two inputs, while the downloadable report remains plain text for review.
Frequently asked questions
Is this a visual Markdown diff?
No. It compares source lines. Use the rendered preview for layout checks and this tool for the exact source edits behind them. Neither check replaces verifying a changed technical claim.
Can I apply the downloaded report as a Git patch?
No. The download is a text review report, not a unified patch. It does not include the file headers or hunk information needed to apply changes safely.
Why does a moved paragraph appear twice?
The tool labels the old location as deleted and the new location as added. It does not detect moves. Read both locations to confirm whether surrounding instructions or heading context also changed.
Does the comparison upload my documents?
No document upload is used for the comparison. Both inputs are processed in the current browser page. They are not stored as a revision history, so retain your original files and avoid pasting secrets.