Gantt chart generator for Mermaid

Paste a task table with start dates, durations, dependencies and milestones, and get ready-to-render Mermaid gantt source.

Try:
Mermaid gantt source

Write the plan, not the syntax

Mermaid's gantt syntax is compact but fussy: every task needs an id before you can point another task at it, tags have to come first in the spec, and one stray colon in a task name breaks the whole diagram. This tool takes the plan in the shape you already think about it — a task, when it starts, how long it takes — and writes the Mermaid source for you.

Everything runs locally in your browser. The task list never leaves your machine.

The task table

One task per line, up to five columns, separated by a pipe (|), a tab, or a comma:

name | start | duration | tags | id

A line starting with section or ## opens a section. Blank lines, and lines starting with #, // or %%, are ignored — so you can keep notes in the plan.

Worked example

Input:

section Design
Wireframes | 2026-03-02 | 5d | done
Visual design | after Wireframes | 1w | active
Design sign-off | after Visual design | | milestone

with the title Q2 launch plan, axis format %b %d, tick interval 1week and skip weekends turned on, produces:

gantt
    title Q2 launch plan
    dateFormat YYYY-MM-DD
    axisFormat %b %d
    tickInterval 1week
    excludes weekends
    section Design
        Wireframes      :done, wireframes, 2026-03-02, 5d
        Visual design   :active, visual_design, after wireframes, 1w
        Design sign-off :milestone, design_sign_off, after visual_design, 0d

Paste that into a GitHub or GitLab comment, a Markdown file, a Notion code block, an Obsidian note, or any Mermaid-compatible viewer and it renders as a timeline. Turn on Wrap in a Markdown mermaid fence to get the surrounding ```mermaid block too.

Chart options

OptionWhat it does
Chart titleAdds a title line above the timeline.
Date formatHow you write dates, from YYYY-MM-DD to DD/MM/YYYY or Unix seconds. Also validates every date you type.
Axis label formatMermaid's axisFormat, a strftime pattern such as %b %d or %d/%m.
Axis tick intervalMermaid's tickInterval1week, 2day, 6hour, 1month.
Skip weekendsAdds weekends to the excludes line so bars step over Saturday and Sunday.
Weekend starts onMoves the weekend to Friday+Saturday (needs Mermaid 11 or newer).
Other non-working daysExtra excluded dates or weekday names, e.g. 2026-04-03, monday.
Show the today markerOff emits todayMarker off — useful for a historical or illustrative chart.
Compact display modePacks non-overlapping tasks onto shared rows (needs Mermaid 10 or newer).

Limits and edge cases

FAQ

Do I have to invent an id for every task?

No. An id is derived from the task name — Visual design becomes visual_design — so you can write after Visual design and it resolves. The optional fifth column lets you set a short id by hand when you would rather type after des than the full name.

How do I add a milestone?

Tag the task milestone and leave the duration column empty. Milestones are single points in time, so a blank duration becomes 0d automatically. Give a start date or an after <task> reference to place it — for example Public launch | after Beta | | milestone.

Why does my task start on the wrong day when weekends are excluded?

Mermaid applies excludes by extending a bar over the skipped days, not by moving its start. A five-day task starting on a Thursday with weekends excluded finishes the following Wednesday. If a task must not begin on a weekend, give it an explicit start date on a working day.

Can I mark work as done, in progress or critical?

Yes — put done, active or crit in the tags column, space separated if you want more than one. They map to Mermaid's built-in styling: completed bars, the in-progress highlight, and the critical emphasis. The generator reorders them into the sequence Mermaid expects, so crit done is fine.

What date formats can I use?

Pick one from the date format list and write every date that way: ISO 2026-03-02, day-first 02/03/2026, month-first 03/02/2026, slash or hyphen separated, with an optional time, or Unix epoch seconds. The choice is emitted as Mermaid's dateFormat and used to validate your input, so a typo is caught here rather than rendering as an empty chart.

Where does the generated code actually render?

Anywhere Mermaid runs: GitHub and GitLab Markdown, Notion and Obsidian code blocks, MkDocs and Docusaurus sites, the Mermaid live editor, and most modern wikis. Compact display mode needs Mermaid 10 or newer, and moving the weekend to Friday needs Mermaid 11 or newer; everything else works on older versions too.

Developer & Automation Access

Run it from the terminal

Same engine as this page, headless — via the gizza CLI:

gizza tool gantt-mermaid-generator "section Design
Wireframes | 2026-03-02 | 5d | done
Visual design | after Wireframes | 1w | active
Design sign-off | after Visual design | | milestone"

New to the CLI? Get gizza →

Open it by URL

Pre-fill and auto-run this tool with query parameters — the names match the API/CLI:

https://gizza.ai/tools/gantt-mermaid-generator/?tasks=section%20Design%0AWireframes%20%7C%202026-03-02%20%7C%205d%20%7C%20done%0AVisual%20design%20%7C%20after%20Wireframes%20%7C%201w%20%7C%20active%0ADesign%20sign-off%20%7C%20after%20Visual%20design%20%7C%20%7C%20milestone&title=Q2%20launch%20plan&delimiter=auto&date_format=YYYY-MM-DD&axis_format=%25b%20%25d&tick_interval=1week&exclude_weekends=true&weekend=saturday&excludes=2026-04-03%2C%202026-04-06&today_marker=true&compact=true&fence=true

Machine-readable descriptor: tool.json — title + parameters JSON Schema for agents.