Skip to content

All Diagram Options for Documentation

A comprehensive visual guide to every diagram tool available for documentation sites.

Quick Comparison Table

ToolTypeSyntaxBest ForVitePress Support
MermaidText-to-diagramMarkdown-likeFlowcharts, sequences, ER diagramsNative plugin
PlantUMLText-to-diagramCustom DSLUML, architecturePlugin available
Graphviz/DOTText-to-diagramDOT languageComplex graphs, networksVia Kroki
D2Text-to-diagramModern DSLSoftware architectureVia Kroki
ExcalidrawVisual editorJSON/DrawHand-drawn styleEmbed/Plugin
Draw.ioVisual editorXMLComplex diagramsEmbed SVG/PNG
MarkmapText-to-diagramMarkdownMind mapsPlugin available
NomnomlText-to-diagramSimple DSLUML-styleVia Kroki
ASCII ArtTextCharactersSimple, universalNative
SvgbobASCII-to-SVGASCII artConvert ASCII to prettyVia Kroki
DitaaASCII-to-diagramASCII artASCII to boxesVia Kroki
PikchrText-to-diagramPIC-likeTechnical docsVia Kroki
BPMNVisual/TextBPMN specBusiness processesVia Kroki
BytefieldText-to-diagramClojure DSLData structures, protocolsVia Kroki
WaveDromText-to-diagramJSONDigital timingVia Kroki
Chart.jsJavaScriptJS/JSONData visualizationCustom component
PenroseText-to-diagramCustom DSLMathematical diagramsExperimental

1. Mermaid.js (Current Choice)

Pros: Native VitePress support, large community, many diagram types, easy syntax Cons: Limited styling, can get complex for large diagrams

Flowchart

Sequence Diagram

State Diagram

Entity Relationship

Class Diagram

Gantt Chart

Pie Chart

Mindmap

Timeline

Quadrant Chart

Git Graph


2. PlantUML

Pros: Comprehensive UML support, mature, many diagram types Cons: Requires server/Java, different syntax than Mermaid

Example Syntax (rendered via Kroki or PlantUML server)

@startuml
actor User
participant "Web App" as WA
participant "API Server" as API
database "Database" as DB

User -> WA: Click button
WA -> API: POST /action
API -> DB: INSERT
DB --> API: OK
API --> WA: 200 OK
WA --> User: Show success
@enduml

Visual representation:

┌─────┐          ┌─────────┐          ┌───────────┐          ┌──────────┐
│User │          │ Web App │          │API Server │          │ Database │
└──┬──┘          └────┬────┘          └─────┬─────┘          └────┬─────┘
   │  Click button   │                      │                     │
   │────────────────>│                      │                     │
   │                 │    POST /action      │                     │
   │                 │─────────────────────>│                     │
   │                 │                      │      INSERT         │
   │                 │                      │────────────────────>│
   │                 │                      │        OK           │
   │                 │                      │<────────────────────│
   │                 │       200 OK         │                     │
   │                 │<─────────────────────│                     │
   │   Show success  │                      │                     │
   │<────────────────│                      │                     │

3. Graphviz / DOT Language

Pros: Extremely powerful for complex graphs, automatic layout algorithms Cons: Steeper learning curve, requires external rendering

Example DOT Syntax

digraph G {
    rankdir=LR;
    node [shape=box, style=filled, fillcolor=lightblue];

    Start -> Process1;
    Start -> Process2;
    Process1 -> Merge;
    Process2 -> Merge;
    Merge -> End;

    Start [shape=circle, fillcolor=green];
    End [shape=doublecircle, fillcolor=red];
}

Visual representation:

    ┌──────────┐
    │ Process1 │──────┐
    └──────────┘      │
         ▲            ▼
    ┌────┴───┐   ┌────────┐   ┌─────┐
    │ Start  │   │ Merge  │──>│ End │
    └────┬───┘   └────────┘   └─────┘
         │            ▲
         ▼            │
    ┌──────────┐      │
    │ Process2 │──────┘
    └──────────┘

4. D2 (Modern Alternative)

Pros: Modern syntax, beautiful defaults, great for architecture diagrams Cons: Newer tool, smaller community

Example D2 Syntax

direction: right

user: User {
  shape: person
}

frontend: Frontend {
  web: Web App
  mobile: Mobile App
}

backend: Backend {
  api: API Server
  worker: Background Worker
}

database: Database {
  shape: cylinder
}

user -> frontend.web: HTTPS
user -> frontend.mobile: HTTPS
frontend -> backend.api: REST
backend.api -> database: SQL
backend.worker -> database: SQL
backend.api -> backend.worker: Queue

Visual representation:

                    ┌─────────────────────────────────────────┐
                    │              Frontend                    │
    ┌───────┐       │  ┌───────────┐    ┌─────────────┐       │
    │       │ HTTPS │  │  Web App  │    │ Mobile App  │       │
    │ User  │──────>│  └───────────┘    └─────────────┘       │
    │       │       │                                          │
    └───────┘       └────────────────────┬────────────────────┘
                                         │ REST
                    ┌────────────────────▼────────────────────┐
                    │              Backend                     │
                    │  ┌───────────┐    ┌─────────────┐       │
                    │  │API Server │───>│   Worker    │       │
                    │  └─────┬─────┘    └──────┬──────┘       │
                    └────────┼─────────────────┼──────────────┘
                             │ SQL             │ SQL
                             ▼                 ▼
                         ╭───────────────────────╮
                         │      Database         │
                         ╰───────────────────────╯

5. Excalidraw (Hand-Drawn Style)

Pros: Beautiful hand-drawn aesthetic, visual editor, collaborative Cons: Not text-based, harder to version control

Visual Style Example

    ╭─────────────────╮         ╭─────────────────╮
    │                 │         │                 │
    │    Frontend     │────────>│     Backend     │
    │                 │         │                 │
    ╰────────┬────────╯         ╰────────┬────────╯
             │                           │
             │                           │
             ▼                           ▼
    ╭─────────────────╮         ╭─────────────────╮
    │                 │         │                 │
    │      CDN        │         │    Database     │
    │                 │         │                 │
    ╰─────────────────╯         ╰─────────────────╯

    (Imagine this with wobbly hand-drawn lines and
     a sketch-like appearance)

6. ASCII Art (Universal)

Pros: Works everywhere, no dependencies, git-friendly Cons: Limited styling, manual layout, time-consuming

Box Drawing Characters

┌─────────────────────────────────────────────────────────────┐
│                     SYSTEM ARCHITECTURE                      │
├─────────────────────────────────────────────────────────────┤
│                                                              │
│   ┌──────────┐     ┌──────────┐     ┌──────────┐            │
│   │  Client  │────>│   API    │────>│ Database │            │
│   └──────────┘     └──────────┘     └──────────┘            │
│        │                │                                    │
│        │                ▼                                    │
│        │          ┌──────────┐                               │
│        └─────────>│   CDN    │                               │
│                   └──────────┘                               │
│                                                              │
└─────────────────────────────────────────────────────────────┘

Simple ASCII (No Special Characters)

+------------------+
|     Client       |
+--------+---------+
         |
         v
+--------+---------+
|    API Server    |
+--------+---------+
         |
         v
+--------+---------+
|    Database      |
+------------------+

7. Markmap (Mind Maps from Markdown)

Pros: Uses familiar markdown syntax, great for hierarchical info Cons: Only for mind maps

Example Markdown Source

markdown
# Project

## Frontend
- React
- TypeScript
- Tailwind

## Backend
- Node.js
- Express
- PostgreSQL

## DevOps
- Docker
- Kubernetes
- GitHub Actions

Creates an interactive mind map radiating from center


8. Nomnoml (Simple UML)

Pros: Very simple syntax, clean output Cons: Limited diagram types

Example Syntax

[User] -> [Application]
[Application] -> [Database]
[Application] -> [Cache]

[User|
  +name: string
  +email: string
]

[Application|
  +start()
  +stop()
]

9. Svgbob (ASCII to Pretty SVG)

Pros: Converts ASCII art to beautiful SVG Cons: Requires rendering step

Input ASCII

    +--------+
    |        |
    | Server |----+
    |        |    |
    +--------+    |
                  v
              .-------.
             (  Cloud  )
              `-------'

Output

Renders to smooth SVG with proper curves and styling.


10. Ditaa (ASCII to Diagrams)

Pros: Rich ASCII conversion, recognizes shapes Cons: Java dependency

Input

    +--------+   +-------+    +-------+
    |        | --+ ditaa +--> |       |
    |  Text  |   +-------+    |diagram|
    |Document|   |!magic!|    |       |
    |     {d}|   |       |    |       |
    +---+----+   +-------+    +-------+
        :                         ^
        |       Lots of work      |
        +-------------------------+

Output

Converts to colored diagram with proper shapes, shadows, and styling.


11. Chart.js / Data Visualizations

Pros: Beautiful charts, interactive, responsive Cons: Requires JavaScript, not text-based

Types Available

  • Line charts
  • Bar charts
  • Pie/Doughnut charts
  • Radar charts
  • Scatter plots
  • Bubble charts
  • Area charts

12. BPMN (Business Process)

Pros: Standard notation, great for business workflows Cons: Complex, specific use case

Example Visual

    ○──────>□──────>◇──────>□──────>◎
   Start   Task1  Gateway  Task2   End

                    └──────>□
                          Task3

13. Bytefield (Data Structures)

Pros: Perfect for protocol documentation, memory layouts Cons: Very specific use case

Example - TCP Header

┌─────────────────┬─────────────────┐
│   Source Port   │    Dest Port    │
├─────────────────┴─────────────────┤
│          Sequence Number          │
├───────────────────────────────────┤
│       Acknowledgment Number       │
├────┬──────┬──────┬────────────────┤
│Offs│Reserv│Flags │     Window     │
├────┴──────┴──────┼────────────────┤
│    Checksum      │  Urgent Ptr    │
└──────────────────┴────────────────┘

14. WaveDrom (Digital Timing)

Pros: Perfect for hardware/protocol timing diagrams Cons: Very specific use case

Example

{ signal: [
  { name: "clk",  wave: "p......." },
  { name: "data", wave: "x.345x..", data: ["a","b","c"] },
  { name: "req",  wave: "0.1..0.." },
  { name: "ack",  wave: "1....01." }
]}

Renders to:

     ┌─┐ ┌─┐ ┌─┐ ┌─┐ ┌─┐ ┌─┐ ┌─┐ ┌─┐
clk  │ └─┘ └─┘ └─┘ └─┘ └─┘ └─┘ └─┘ └─
     ─────┬───┬───┬───────────────────
data xxxxx│ a │ b │ c │xxxxxxxxxxxxxxx
     ─────┴───┴───┴───┴───────────────
          ┌───────────┐
req  ─────┘           └───────────────
     ─────────────────────┐     ┌─────
ack                       └─────┘

Recommendation Matrix

For General Documentation

  1. Mermaid - Best overall, native VitePress support
  2. PlantUML - If you need comprehensive UML
  3. ASCII - For maximum compatibility

For Architecture Diagrams

  1. D2 - Modern, beautiful output
  2. Mermaid - Good enough for most cases
  3. Graphviz - Complex graphs

For Business Process

  1. Mermaid (flowcharts)
  2. BPMN - If you need standard notation
  3. PlantUML - Activity diagrams

For Hand-Drawn Style

  1. Excalidraw - Best visual editor
  2. Svgbob - If you want ASCII source

For Data/Charts

  1. Chart.js - Interactive charts
  2. Mermaid - Pie, Gantt charts

For Technical/Hardware

  1. WaveDrom - Timing diagrams
  2. Bytefield - Protocol structures
  3. Graphviz - State machines

VitePress Integration Guide

Native Support

  • Mermaid - vitepress-plugin-mermaid

Via Kroki (Universal Renderer)

Kroki supports: PlantUML, GraphViz, D2, Excalidraw, Nomnoml, Svgbob, Ditaa, BPMN, Bytefield, WaveDrom, and more!

js
// vitepress config for Kroki
import { defineConfig } from 'vitepress'

export default defineConfig({
  markdown: {
    config: (md) => {
      // Add Kroki plugin for multiple diagram types
    }
  }
})

As Embedded Images

  • Export from Draw.io, Excalidraw, Lucidchart as SVG/PNG
  • Reference in markdown: ![diagram](./diagram.svg)

Interactive Demo

Try changing between these examples to see different rendering styles!

Same Workflow - Different Tools

Mermaid:

ASCII:

┌───────┐     ┌─────────┐     ┌────────┐
│ Input │────>│ Process │────>│ Output │
└───────┘     └─────────┘     └────────┘

Simple Text:

Input --> Process --> Output

Mermaid Diagram Style Comparison