N
NJHTools

Free Gantt Chart Maker

Write tasks, dates and dependencies as Mermaid text and get a Gantt chart with live preview and SVG or PNG export. Free, no signup, and it runs in your browser.

Zoom
100%
Export
Mermaid code18 lines

Tab inserts spaces. Press Esc, then Tab, to move focus out. Autosaved in this browser.

PreviewLoading Mermaid…

Rendering…

Example gantt chart code

This is the Mermaid source loaded in the editor above. Copy it into a Markdown file inside a ```mermaid block and GitHub, GitLab, Notion or Obsidian will render it.

gantt
    title Website Launch Plan
    dateFormat YYYY-MM-DD
    axisFormat %b %d
    excludes weekends

    section Planning
    Requirements        :done,    req,  2026-01-05, 5d
    Wireframes          :done,    wire, after req, 4d

    section Build
    Frontend            :active,  fe,   after wire, 10d
    Backend API         :         be,   after wire, 8d
    Integration         :         int,  after fe be, 3d

    section Launch
    QA and fixes        :crit,    qa,   after int, 4d
    Go live             :milestone, live, after qa, 0d

Gantt chart syntax cheat sheet

SyntaxWhat it does
ganttStart a Gantt chart.
dateFormat YYYY-MM-DDHow dates in tasks are written. axisFormat %b %d sets the axis labels.
section NameGroup the following tasks under a heading.
Task :id, 2026-01-05, 5dTask with id, start date and duration (d, w, h). An end date also works.
after id1 id2Start when the listed tasks are finished.
done / active / crit / milestoneStatus tags before the id, comma-separated.
excludes weekendsSkip weekends (or listed dates) when counting durations.

How to make a Mermaid gantt chart

  1. 1Start the code with gantt and add a title.
  2. 2Set the date format with dateFormat YYYY-MM-DD.
  3. 3Group tasks under section headings.
  4. 4Add tasks with an ID, a start date or dependency, and a duration.
  5. 5Export as SVG or PNG, or copy a share link.

Dates and durations

dateFormat sets how you write dates in the task lines, for example dateFormat YYYY-MM-DD. axisFormat controls how dates appear on the axis and uses strftime-style codes such as %b %d.

A task line looks like Design :des1, 2026-01-05, 10d, meaning task ID des1 starts on that date and lasts 10 days. Durations can use units such as d for days and w for weeks.

Dependencies and status tags

Replace the start date with after des1 to start a task when another ends, as in Build :build, after des1, 15d. Moving one task then moves everything that depends on it.

Put tags before the ID to style tasks: done, active, crit for critical-path items, and milestone for zero-length markers such as Launch :milestone, m1, 2026-03-01, 0d.

Excluding weekends

Add excludes weekends so durations count working days only. You can also exclude specific dates, such as holidays, in the same line.

Use one section per team or phase so the chart stays easy to scan.

Frequently Asked Questions

How do I make a Gantt chart in Mermaid?↓

Start with gantt, set dateFormat YYYY-MM-DD, add a section, then write tasks such as Research :r1, 2026-01-05, 7d. The chart updates as you type.

How do I make a task start after another one?↓

Use after with the other task's ID instead of a start date, for example Build :b1, after r1, 10d.

How do I add a milestone?↓

Add the milestone tag and a zero duration: Release :milestone, m1, 2026-02-01, 0d.

Will this diagram render on GitHub, GitLab or Notion?↓

Yes, all three render Mermaid. On GitHub and GitLab, put the code in a fenced code block that starts with ```mermaid. In Notion, add a code block and set its language to Mermaid. Hosted platforms may run an older Mermaid version, so very new syntax can fail there.

How do I export the diagram as PNG or SVG?↓

Use the export buttons above the preview. SVG stays sharp at any size and suits docs and slides; PNG is a raster image that works anywhere images are accepted. Both are created in your browser.

How does sharing work, and is my diagram private?↓

The share link stores your diagram code in the URL hash, the part after #, which browsers do not send to servers. Nothing is uploaded, and your work is autosaved in your own browser. Anyone with the link can see the diagram, so share it only with people you trust.

Last updated: