Markdown Diff Lab

Markdown Diff & Comparator

Compare two Markdown files side-by-side or unified with color-coded additions, deletions, and structural heading section tracking.

Markdown Diff & Comparator

Side-by-side and unified Myers LCS diff with structural AST section tracking

+7 additions
-5 deletions
|8 unchanged lines|2 structural section change(s)
ORIGINAL (VERSION A)
MODIFIED (VERSION B)
LIVE DIFF INSPECTORUnified Line View
STRUCTURAL SECTION CHANGES:
• Added section "H1 Project Documentation v2.0"
• Removed section "H1 Project Documentation v1.0"
1-# Project Documentation v1.0
1+# Project Documentation v2.0
2
3-This is the initial release of our API toolkit.
3+Welcome to the modernized API toolkit with real-time diffing and health auditing.
4
5 ## Installation
6 ```bash
7-npm install old-package
7+npm install @mdforge/core
8 ```
9
10 ## Features
11-- Basic Markdown parsing
12-- Local export
11+- CodeMirror 6 with live preview
12+- Markdown AST Health scoring
13+- Privacy Shield for credential detection
14+- Time Machine snapshots & Diff Lab
13

Visualizing Markdown Evolution & Git Diffs

Tracking changes across documentation drafts, technical specifications, and open-source README updates is essential for quality assurance. MDForge provides real-time line-by-line diffing paired with AST-aware section detection.

Line-by-Line Tracking

Accurate Myers LCS algorithm identifies exact line insertions (+ green) and deletions (- red).

Structural Section Tracking

Detects when headings are reordered, promoted/demoted (e.g. H2 → H3), added, or removed across document versions.

Privacy-Preserving Execution

Diff calculation runs inside browser Web Workers without freezing the UI or sending sensitive draft text over the network.

Frequently Asked Questions

How does MDForge compare two Markdown documents?

MDForge uses a client-side Myers LCS (Longest Common Subsequence) algorithm for line-by-line diffing, combined with an AST section detector for tracking added, removed, or modified heading depths.

Is my document text uploaded to an external diff service?

No. All diff comparisons run 100% locally in your browser (utilizing native Web Workers). Nothing is transmitted to external servers or cloud services.

Can I view diffs side-by-side and unified?

Yes! Toggle between "Unified" (single-stream line diff) and "Side-by-Side" view modes using the top toolbar switch.

Can I copy the unified diff output for Git patch reviews?

Yes, click "Copy Diff Output" to copy standard unified diff text with + and - line annotations to your clipboard.

Related Markdown Utilities

Experience Full MDForge Studio

Unlock multi-document tabs, Health audits, Privacy scanning, and Time Machine snapshots in one distraction-free window.

Open Fullscreen Studio