How to compare Markdown documents
Put the original document in Before and the revision in After. Markdown Diff Checker reads headings, paragraphs, list items, tables, fenced code, blockquotes, and horizontal rules as separate blocks. You can then switch between Block diff, Source diff, and Rendered preview, with three whitespace controls for the block comparison.
Compare Markdown files in five steps
- Paste the original Markdown into Before and the revised Markdown into After.
- Choose Upload original Markdown or Upload modified Markdown for a
.md,.markdown, or.txtfile. - Open Block diff to compare parsed blocks and changed words inside paired blocks.
- Open Source diff to compare the raw Markdown lines.
- Open Rendered preview to inspect the separate Before and After renderings with change highlights.
What a Markdown block diff shows
Each heading, paragraph, list item, fenced code block, blockquote, table, or horizontal rule becomes one comparison unit. When a removed block and an added block have the same type, Block diff pairs them as a modified block. A block with no pair appears as added or removed.
Before:
- Fix login
After:
- Fix sign-in
Block diff pairs these list items and marks the changed words. Similarity is the percentage of unchanged pairs among all paired results. The result area reports Blocks added, Blocks removed, Blocks modified, and Blocks unchanged.
How whitespace options change Markdown comparison
Ignore trailing whitespace and Collapse multiple spaces are checked when the page opens. The first removes spaces and tabs at line ends before block matching. The second changes each run of spaces or tabs into one space.
Before: Title text
After: Title text
With Collapse multiple spaces checked, these lines match in Block diff. Ignore blank-line differences starts unchecked. When checked, it compresses every whitespace run into one space before matching. All three controls affect block matching only. Source diff always compares the raw lines.
Which Markdown syntax the comparison reads
The parser reads hash headings and underlined headings, list items marked with -, *, +, or a number followed by . or ), fenced code with matching backticks or tildes, pipe tables with a delimiter row, blockquotes, horizontal rules, and ordinary paragraphs. Empty lines separate blocks.
Rendered preview supports headings, paragraphs, lists, fenced code, blockquotes, tables, horizontal rules, inline code, italics, and links. The inline formatter removes bold markers and turns supported single-marker emphasis into italics. It escapes source text as HTML before formatting. Link URLs beginning with javascript:, data:, or vbscript: become #. Other Markdown can remain plain text or render differently.
Both panels need non-whitespace content before results appear. Block pairing can change when the document structure changes. Tables stay together as whole blocks, and raw HTML is escaped rather than passed through as markup.
Where Markdown diffs come up
For a README revision, compare the two versions in Block diff, then check Rendered preview for changes to headings, lists, and links.
For release notes with a table or fenced command example, use Source diff to inspect the exact Markdown lines.
For a generated Markdown report, the block counts show how many blocks were added, removed, modified, or left unchanged.
When to use Markdown Diff Checker
Open Compare Tools when the input format is unclear. Choose Compare Text for plain prose and character, word, or line differences. Choose HTML Diff Checker for HTML source with rendered previews, or Code Diff Checker for code with syntax highlighting, line numbers, and patch copying.
Frequently asked questions
How do I compare Markdown files?
Paste one document in Before and the other in After, or use Upload original Markdown and Upload modified Markdown. The file controls accept .md, .markdown, and .txt files.
What is a Markdown block diff?
A Markdown block diff compares parsed headings, paragraphs, list items, tables, fenced code, blockquotes, and horizontal rules as separate units. Block diff can also highlight changed words within a paired block.
Does Source diff ignore whitespace options?
No, Source diff compares raw lines and ignores the three whitespace controls. Those options change the signatures used for block matching.
Does Markdown Diff Checker send my document anywhere?
The comparison reads the Before and After values in the browser. This page contains no fetch, XMLHttpRequest, sendBeacon, or form post for those values.