Markdown to PDF with Mermaid Diagrams

Create flowcharts, sequence diagrams, Gantt charts, and more using simple text syntax — then export everything to a clean PDF. No diagram tools or CLI setup required.

See It in Action

Mermaid diagrams render live in the editor. Here's a preview of the syntax — open in the editor to see the rendered diagram.

Mermaid Diagram Example
Markdown
## System Architecture

```mermaid
graph TD
    A[User] --> B[Web App]
    B --> C{Auth?}
    C -->|Yes| D[Dashboard]
    C -->|No| E[Login Page]
    D --> F[API Server]
    F --> G[(Database)]
```

## Deployment Flow

```mermaid
sequenceDiagram
    Dev->>GitHub: Push code
    GitHub->>CI: Trigger build
    CI->>Tests: Run tests
    Tests-->>CI: Pass
    CI->>Prod: Deploy
```
Live Preview

System Architecture

Deployment Flow

Why Mermaid in PDF Matters

Most Markdown-to-PDF converters silently drop Mermaid blocks or show raw syntax. MarkdownToPDF is one of the few browser-based tools that actually renders Mermaid diagrams in both the preview and the exported PDF.

No CLI Setup

No mermaid-cli, no Docker, no puppeteer. Just paste and render.

Live Preview

See your diagram update in real-time as you edit the syntax.

PDF Ready

Diagrams are rendered as SVG and embedded cleanly in the PDF.

Supported Diagram Types

Flowcharts

Decision trees, process flows, and workflow diagrams. Top-down, bottom-up, left-right, or right-left orientations.

```mermaid
graph TD
  A[Start] --> B{Decision}
  B -->|Yes| C[Action]
  B -->|No| D[End]
```

Sequence Diagrams

API interactions, protocol flows, and system communication patterns. Show actors, messages, and activation boxes.

```mermaid
sequenceDiagram
  Client->>Server: Request
  Server-->>Client: Response
```

Gantt Charts

Project timelines, sprint planning, and milestone tracking. Export schedules as part of your documentation.

```mermaid
gantt
  title Project Plan
  section Phase 1
  Task A: a1, 2024-01-01, 30d
```

Class Diagrams

Object-oriented design, UML class hierarchies, and interface documentation for software architecture docs.

```mermaid
classDiagram
  Animal <|-- Duck
  Animal: +String name
  Duck: +swim()
```

ER Diagrams

Database schema visualization, entity relationships, and data modeling for technical specifications.

```mermaid
erDiagram
  USER ||--o{ ORDER : places
  ORDER ||--|{ ITEM : contains
```

Pie Charts

Simple data distribution charts for reports, surveys, and quick data visualization.

```mermaid
pie title Languages
  "JS" : 45
  "Python" : 30
  "Go" : 25
```

Common Use Cases

Architecture decision records (ADRs)
API documentation with sequence diagrams
Database schema documentation with ER diagrams
Project proposals with Gantt timelines
Onboarding guides with process flowcharts
Technical specs with class diagrams
Sprint retrospective reports
System design documents for interviews

Try Mermaid Diagrams Now

Paste Mermaid syntax into the editor and see your diagrams rendered live.

Start Converting

Built by Yogendra Singh