Gantt Chart Maker
Write tasks with a start, a duration or a dependency and get a Gantt chart with sections, milestones and critical tasks. Reschedule by editing one date and everything that depends on it moves.
- Diagrams render locally in your browser. Nothing is uploaded to a server.
How it works
Pick a Template (a product launch, a sprint, an event plan or a thesis) or start a new chart with gantt and a dateFormat line.
Group work with section lines. Under each, write one task per line: its name, a colon, then tags, an id, a start and a length.
Chain tasks with after id instead of fixed dates, so moving the first task moves everything behind it.
Choose a theme and download a PNG at 1× to 4× (white, dark or transparent) or an SVG for a slide, a wiki or a proposal.
A Gantt chart shows work as bars on a calendar. In Mermaid each bar is one line of text: a name, optional status tags, an id, a start (a date or "after another task") and a length such as 5d. Because dependencies are expressed as after, the chart behaves like a small schedule: change the duration of one task and every task that follows it shifts on redraw. That is the part that is tedious in a drag-and-drop tool and trivial in text.
Gantt Chart Maker syntax cheat sheet
Header lines
These set up the chart before the first task. Only gantt is required, but dateFormat is needed as soon as you write dates.
| Syntax | Meaning |
|---|---|
gantt | First line; starts a Gantt chart. |
title Product launch | Heading shown above the chart. |
dateFormat YYYY-MM-DD | How dates in the task lines are written. Without it Mermaid cannot read them reliably. |
axisFormat %b %d | How dates appear on the axis, using strftime-style codes: %d %b, %Y-%m, %W for week number. |
excludes weekends | Skip Saturdays and Sundays; durations count working days. You can also list specific dates. |
todayMarker off | Hide the vertical line for today (it is on by default). |
tickInterval 1week | Spacing of the axis ticks: 1day, 1week, 1month. |
Task lines
A task is Name :tags, id, start, end. Tags, id and start are all optional; the last two values are the start and the length or end.
| Syntax | Meaning |
|---|---|
Design :d1, 2026-03-02, 5d | Task with id d1, a start date and a 5-day length. |
Build :after d1, 10d | Starts when d1 ends. Use after a, b to wait for the later of two tasks. |
Review :2026-03-16, 2026-03-20 | Start and end both given as dates. |
Polish :until d3 | Runs until the given task starts (Mermaid 10.9 and later). |
Durations: 30m, 12h, 5d, 2w, 1M | Minutes, hours, days, weeks and months. |
section Build | Starts a new group; all following tasks belong to it until the next section. |
%% comment | Ignored by Mermaid. |
Task states
Put one or more tags before the id to change how the bar looks. They combine: crit, done.
| Syntax | Meaning |
|---|---|
done | Finished task, drawn in a muted colour. |
active | Task in progress, drawn highlighted. |
crit | Critical task, drawn in red to mark the path that cannot slip. |
milestone | A point in time rather than a bar. Give it a duration of 0d. |
(no tag) | A normal future task. |
Planning habits that work in text
- Give an id to every task that something depends on, and use
afterfor the rest. Hard-coded dates should be the exception, such as a fixed deadline or an event date. - Mark a milestone for each real hand-off (a demo, a submission, an approval). They make a long chart scannable.
- Use
excludes weekendsfor work plans so a 5-day task really spans one working week. - Keep one chart to one audience. A 40-row chart is a tracking sheet, not a presentation; split it by phase and share each as its own PNG.
Where the code renders
GitHub, GitLab and Obsidian render Gantt charts from a fenced mermaid code block, so a project plan can sit in a README or a wiki and be updated in a pull request. Notion shows them through a code block set to Mermaid. Gantt syntax has gained options over the years (until, todayMarker, tickInterval), and each platform ships its own Mermaid version, so a feature that draws here may not draw there yet. For status reports, slides and email, export a PNG, which looks the same everywhere.
Text first, not drag and drop
This is a text-first Gantt maker. You cannot drag a bar to a new date or stretch it with the mouse, and there is no resource or percent-complete tracking. In exchange the schedule is a short text file you can version, diff and review, and dependencies cannot silently drift apart. For a plan you present or archive it is plenty; for live project tracking with assignees and baselines, use a project management tool and recreate the summary here.
Export and sharing
Pick copy SVG or download SVG for a sharp vector file, or download PNG at 1×, 2×, 3× or 4× on a white, dark or transparent background. Share link compresses the code with lz-string and puts it in the URL fragment, the part after #, which browsers never send to a server. Your draft is saved in this browser's local storage, separately from the other diagram pages, so a refresh does not lose it. For other diagram types such as class, state, pie, timeline and git graph, use the full Mermaid editor.
Frequently asked questions
Frequently asked questions
How do I make a task depend on another one?
Give the first task an id and start the second with after: Design :d1, 2026-03-02, 5d then Build :after d1, 10d. If the design task gets longer, the build bar moves with it.
How do I add a milestone?
Use the milestone tag with a zero-length duration, for example Release :milestone, 2026-02-12, 0d. It is drawn as a diamond instead of a bar.
Can I skip weekends?
Yes. Add excludes weekends under the header lines and durations count working days only. You can also exclude specific dates, such as excludes 2026-12-25.
Why does my chart show nothing or an error?
The usual causes are a missing dateFormat line, a date that does not match it, or an after that points to an id that does not exist. The error appears under the editor and the last good chart stays visible until the code is valid again.
Is my project plan uploaded anywhere?
No. Everything runs in this page. The draft is kept in your browser's local storage, and a share link stores the chart in the URL fragment, which browsers never send to a server.