Gantt Chart Online Editor

Make Gantt charts online with Mermaid: sections, task dependencies, milestones, critical tasks and weekends, with live preview and free PNG, SVG or PDF export.

Try it

Edit the code; the preview updates as you type.

Open in editor

Rendering diagram…

What is a gantt chart?

A Gantt chart lays project tasks out on a calendar so you can see what runs when, what depends on what, and where the deadlines are.

Mermaid builds the chart from a short text list: a date format, optional sections, and one task per line with a start date or dependency and a duration. Change a date and every bar moves.

When to use it

  • Project and release plans in a README or wiki
  • Sprint and roadmap overviews for stakeholders
  • Thesis, course or event schedules
  • Showing dependencies and the critical path
  • Migration or launch checklists with milestones

Mermaid gantt chart syntax

Every diagram of this type starts with gantt.

SyntaxMeaning
dateFormat YYYY-MM-DDHow dates in the task lines are written.
axisFormat %b %dHow dates on the axis are displayed (d3 time format).
section NameStarts a group of tasks.
Task :id, 2026-01-05, 5dA task with an ID, a start date and a duration (d, w, h, m).
Task :id, after other, 3dStarts the task when another task ends.
done, active, critStatus tags; put them before the ID, separated by commas.
milestoneDraws a diamond instead of a bar; use a 0d duration.
excludes weekendsSkips Saturdays and Sundays when counting durations.
todayMarker offHides the line that marks the current date.

More examples

Fixed end dates instead of durations

Rendering diagram…
Mermaid code
gantt
  title Semester Plan
  dateFormat YYYY-MM-DD
  section Research
  Literature review :r1, 2026-02-02, 2026-02-27
  Experiments       :r2, 2026-03-02, 2026-04-10
  section Writing
  Draft thesis      :w1, after r2, 2026-05-15
  Submit            :milestone, after w1, 0d
The third value can be an end date instead of a duration.

Common mistakes and how to fix them

Dates do not match dateFormat, for example 05/01/2026 with YYYY-MM-DD.
Write every date in exactly the format declared by dateFormat.
Two tasks share the same ID, so after points to the wrong one.
Give every task a unique ID before using it in after.
Status tags are placed after the ID.
Order matters: Task :crit, done, id, start, duration.

Export your gantt chart

Download a PNG, SVG or PDF straight from the playground above. For more options, such as a 1x to 4x scale, a transparent background or copying the image, choose Open in editor and use the Export menu there. Export is free, needs no account and adds no watermark.

Frequently asked questions

How do I make one task start after another?

Give the first task an ID and start the second with after that ID, for example Testing :t2, after t1, 3d. You can list several IDs to wait for all of them.

How do I add a milestone to a Mermaid Gantt chart?

Add the milestone tag and a zero duration, for example Launch :milestone, m1, 2026-03-01, 0d.

Can a Gantt chart skip weekends and holidays?

Yes. excludes weekends skips Saturdays and Sundays, and you can list specific dates such as excludes 2026-12-25.

Can I print the Gantt chart?

Export it as PDF for printing, or as a high-resolution PNG for slides. Long timelines export at full size rather than the size of the preview.