Markdown diff checker
Updated
Paste two versions of a README, spec, or blog post and see exactly what changed: aligned side by side with word-level highlights, or as a unified patch you can paste into a pull request. Whitespace, case, and blank-line changes can be ignored, and the rendered view shows the difference the way a reader sees it.
Before
After
| 1 | # Acme CLI | 1 | # Acme CLI |
| 2 | 2 | ||
| 3 | A command-line tool for managing Acme deployments. | 3 | A command-line tool for managing Acme deployments and rollbacks. |
| 4 | 4 | ||
| 5 | ## Installation | 5 | ## Installation |
| 6 | 6 | ||
| 7 | ```bash | 7 | ```bash |
| 8 | npm install -g acme-cli | 8 | npm install -g @acme/cli |
| 9 | ``` | 9 | ``` |
| 10 | 10 | ||
| 11 | ## Usage | 11 | ## Usage |
| 12 | 12 | ||
| 13 | Run `acme deploy` from your project root. | 13 | Run `acme deploy` from your project root. |
| 14 | Configuration lives in `acme.json`. | 14 | Configuration lives in `acme.config.json`. |
| 15 | 15 | ||
| 16 | ## Options | 16 | ## Options |
| 17 | 17 | ||
| 18 | - `--env` — target environment | 18 | - `--env` — target environment |
| 19 | - `--dry-run` — print the plan without applying it | 19 | - `--dry-run` — print the plan without applying it |
| 20 | - `--yes` — skip the confirmation prompt | ||
| 20 | 21 | ||
| 22 | ## Rollback | ||
| 23 | |||
| 24 | Run `acme rollback <deployment-id>` to revert. | ||
| 25 | |||
| 21 | ## License | 26 | ## License |
| 22 | 27 | ||
| 23 | MIT | 28 | MIT |
| 24 | 29 |
Line diff by Myers' algorithm with word-level highlights inside changed lines. Nothing leaves your browser.
How does the diff work?
Both documents are split into lines and compared with Myers' shortest-edit-script algorithm — the one behind git diff. Runs of removed and added lines that sit next to each other are paired into changed rows, and those pairs get a second, word-level pass so a single edited word in a long paragraph is highlighted rather than the whole line. The similarity figure is the share of rows that are unchanged.
When is a markdown-specific diff better than a generic text diff?
When you need to see the rendered result. Markdown source changes are often invisible in the output (a reflowed paragraph, a switched list marker) or the reverse — a one-character change like a missing space after # turns a heading into a paragraph. The Rendered view makes both cases obvious. For source-level cleanup that is not a meaningful change, run both versions through the formatter first so the diff only shows real edits.
Can I use the patch with git?
Yes. The unified output uses standard --- / +++ headers and @@ hunks with three lines of context, so git apply changes.patch works if the file paths match your repository; rename the headers or use patch -p1 otherwise. To check the result before committing, run it through the markdown linter.
How do I compare two markdown files?
Paste or drop the older version into Before and the newer one into After. The tool aligns the two line by line, marks added lines green, removed lines red, and changed lines amber with the exact words that differ highlighted. Switch to Unified for a patch-style view you can copy or download.
What is the difference between side-by-side and unified view?
Side-by-side shows both versions in aligned columns with line numbers from each file, which is easiest to read. Unified shows one column in the standard patch format with @@ hunk headers and +/- prefixes, which is what git and code review tools use and what you paste into an issue.
Can I ignore whitespace or case changes?
Yes. Ignore whitespace collapses runs of spaces and tabs and trims line ends before comparing, ignore case compares letters case-insensitively, and ignore blank lines drops empty lines from both sides. The visible text is unchanged; only the comparison is relaxed.
Does it show the rendered markdown, not just the source?
The Rendered view shows both versions rendered with GitHub-flavored markdown, tables, code highlighting, and mermaid diagrams, side by side, so you can check what readers actually see.
How large a document can it handle?
Thousands of lines comfortably. The line diff uses Myers algorithm, which is fast when the two versions mostly agree, and the word-level pass only runs on changed line pairs.