All diagram types Open editor

merIDK / Diagram types / Gantt chart

Mermaid Gantt chart: example and syntax

Gantt charts show a project schedule as bars on a timeline, with sections, dependencies and milestones. Because the chart is plain text, it lives next to your code and changes show up in diffs.

Open this example in the editor

Example code

gantt
    title Website launch
    dateFormat YYYY-MM-DD
    excludes weekends
    section Design
        Wireframes      :done,    d1, 2026-01-05, 5d
        Visual design   :active,  d2, after d1, 7d
    section Build
        Frontend        :         b1, after d2, 10d
        Backend         :crit,    b2, after d2, 12d
    section Launch
        QA              :         q1, after b2, 4d
        Go live         :milestone, after q1, 0d

Result

gantt
    title Website launch
    dateFormat YYYY-MM-DD
    excludes weekends
    section Design
        Wireframes      :done,    d1, 2026-01-05, 5d
        Visual design   :active,  d2, after d1, 7d
    section Build
        Frontend        :         b1, after d2, 10d
        Backend         :crit,    b2, after d2, 12d
    section Launch
        QA              :         q1, after b2, 4d
        Go live         :milestone, after q1, 0d

Syntax quick reference

How to use it

  1. Open the example in the editor, or paste your own Mermaid code.
  2. Edit the code on the left. The preview updates as you type, and errors point to the line.
  3. Export SVG or PNG, copy a Markdown block for GitHub or Notion, or copy a share link.

More diagram types