What is a Markdown diff?
A Markdown diff shows what changed between two versions of a Markdown document. A plain text diff is enough when you only care about lines, but Markdown is a source format: the same page can be written in many ways. A paragraph can be wrapped at 80 columns or kept on one line, emphasis can be *b* or _b_, and a list can be reflowed without any reader noticing. Compare those files line by line and you get a wall of red and green for a change nobody can see on the rendered page.
This tool gives you two views of the same pair of documents. The rendered view compares what the Markdown turns into, block by block: paragraphs, headings, lists, tables, code. Each block is marked as equal, added, removed or changed, and inside a changed block the words that differ are underlined or struck through. In a table only the changed cell is highlighted, and whole rows are flagged when they were added or removed. The source view compares line by line, side by side, with word-level marks, plus counters such as +4 −2 and the number of change groups.
It is useful for reviewing release notes, README edits, documentation pull requests, content written by a teammate or by an AI assistant, and any text where you want to know whether the meaning changed or only the formatting. Everything runs in your browser. Your text is never uploaded, and the rendered HTML is sanitized, so scripts inside a document are removed.
How to compare two Markdown documents
- Paste the old version in the Original field and the new one in the Changed field. The page opens with a release notes example already loaded, so you can see the result before pasting anything.
- Choose the mode. Use Rendered to see what a reader would notice, or Source to see every line that changed in the file.
- Leave "Ignore line breaks and extra spaces" on if you want a reflowed paragraph to count as unchanged. Turn it off when exact whitespace matters.
- Read the block labels in the rendered view, or the +N −M counters and change groups in the source view.
- Copy the unified diff or download the
.difffile. The format is the same asdiff -u, so you can apply it withpatch. - Use the swap button to invert the sides, for example to see a change as a rollback.
Examples
A paragraph that was only reflowed
Original and changed hold the same sentence, but the changed version is wrapped differently and uses _b_ where the original used *b*.
This release makes the importer
*much* faster.This release makes the importer _much_ faster.With the option on, the rendered view reports the block as equal. The source view still shows the line change, which is correct: the file did change, the page did not.
A table with one edited cell
| Plan | Seats |
|------|-------|
| Free | 3 |
| Team | 10 |If Team goes from 10 to 25 seats, only that cell is highlighted in the rendered view, with the old value struck through and the new one underlined. The rest of the table stays quiet, so you do not have to hunt through the rows.
A link whose text changed
Changing [docs](https://example.com/a) to [documentation](https://example.com/a) marks the paragraph as changed and highlights the link text. If only the address changes, the visible text is identical, but the block still counts as changed, because a reader who clicks would land somewhere else.
Sharing the result as a patch
--- original.md
+++ changed.md
@@ -1,3 +1,4 @@
# Notes
- Faster importer
+- New export button
- Fixed typosCopy this from the tool and apply it to a file with patch.
Common mistakes
- Reading the source view as a visual change. A long list of changed lines can be only a rewrap. Switch to Rendered first.
- Expecting a moved block to be recognized. A paragraph moved to another place appears as a removal plus an addition.
- Forgetting that code keeps exact spaces. Whitespace inside a code block is meaningful, so the option to ignore extra spaces does not apply there.
- Ignoring link destinations. Two paragraphs that look identical can still differ when only the URL changed. Check blocks marked as changed even when no word is underlined.
- Pasting a document with front matter or HTML and expecting a perfect page. The tool renders GFM, so unusual syntax is shown the way a standard renderer would show it.
Frequently asked questions
Is my text sent anywhere?
No. The comparison and the rendering run locally in your browser, and the rendered HTML is sanitized with DOMPurify before it is shown.
Which Markdown dialect is supported?
GitHub Flavored Markdown through the marked library: tables, task lists, strikethrough and fenced code. Footnotes and other extensions are not supported, and images are not compared as pictures.
Is the diff minimal?
Almost always. It uses the Myers algorithm. If the edit distance goes beyond 3000 lines, the tool falls back to showing everything as removed and everything as added. That result is correct, but it is not the smallest possible one.
Can I trust the unified diff?
The +/− counts were checked against the system diff -u, and the generated patch was applied with patch to confirm it reproduces the changed text.
What if I just need a plain text comparison?
Use the text diff. To review the syntax itself, the Markdown cheat sheet lists what each element looks like. For structured data there is also a JSON diff.