Skip to content
PluginStats

prettier-plugin-mmd weekly downloads statistics

By mmd-toolkit · npm · Prettier plugins

Prettier plugin for the Mermaid diagram syntax (.mmd files and mermaid code blocks in Markdown)

View on npm Fresh · Dec 6, 2026

prettier-plugin-mmd has 362 recorded weekly downloads on npm, a decrease of 51.2% over the past 30 days, ranking #2334 of 3,247 tracked listings.

Weekly downloads
362
Official API · Dec 5, 2026
7-day growth
+220%
+249 weekly downloads
30-day growth
-51.2%
-380 weekly downloads
90-day growth
—
Insufficient history
Rank
#2334
▲ 152 in 7 days

About prettier-plugin-mmd

prettier-plugin-mmd

Japanese version: README.ja.md

A Prettier plugin that formats Mermaid diagrams: .mmd and .mermaid files, and mermaid code blocks in Markdown.

This is a third-party project, not affiliated with mermaid-js. mmd here means the Mermaid diagram syntax, not MultiMarkdown or MikuMikuDance.

Documentation: Formatter.

Playground

Preview this plugin's formatting in the browser. The Formatted tab updates as you edit, with Print width, Indent, and Use tabs controls. Use Apply to source to replace the input with the result.

Open the Playground.

For usage, see the Playground guide.

Installation

Install it next to Prettier 3. It needs Node.js ^20.19.0 || ^22.13.0 || >=24.

npm install --save-dev prettier prettier-plugin-mmd

Then add it to your Prettier configuration. Prettier 3 does not find plugins by itself, so this entry is required:

{
  "plugins": ["prettier-plugin-mmd"]
}

Prettier then formats Mermaid files and Markdown files as usual, for example:

npx prettier --write "**/*.{mmd,mermaid,md}"

Example

Input (file):

flowchart LR
  A --> B; B --> C; C --> D
  subgraph S; E; F; end

Output (file):

flowchart LR
  A --> B
  B --> C
  C --> D
  subgraph S
    E
    F
  end

What is formatted

  • Files ending in .mmd or .mermaid.
  • Markdown code blocks whose info string has mermaid or mmd as its first word. The match is case-sensitive: Mermaid and mermaidx are not formatted.
  • Every diagram type of mermaid.js.
  • The YAML frontmatter of these diagrams, with Prettier's YAML formatter.

The formatting rules of each diagram type are in its document: flowcharts, Agentflow, sequence diagrams, class diagrams, state diagrams, ER diagrams, Gantt charts, user journeys, requirement diagrams, mindmaps, timelines, sankey diagrams, XY charts, quadrant charts, kanban boards, C4 diagrams, Venn diagrams, Ishikawa diagrams, usecase diagrams, pie charts, info diagrams, git graphs, architecture diagrams, treemaps, treeviews, radar diagrams, Wardley maps, railroad diagrams, cynefin diagrams, eventmodeling diagrams, packet diagrams, and block diagrams.

Options

  • useTabs and tabWidth set the indentation. The default is two spaces.
  • endOfLine sets the line endings.
  • printWidth decides two things. A data block @{ … } on one line in a flowchart, an agentflow, or a kanban board is printed on several lines when its line is wider than printWidth and the conditions of Data blocks hold; a block of one entry, for example, stays on its line. The colons of the tasks of a Gantt section are lined up unless that would make a line wider than printWidth and wider than it is (see Task data). The width is the one Prettier measures: a full-width character counts as two columns and a tab as none. A Gantt section counts its lines alone, without what a Markdown list or block quote puts before them. Everywhere else printWidth does not control diagram line breaks. railroad-beta calls follow their grammar structure; see Long lines. Prettier can still use it for Markdown and YAML frontmatter.

When a diagram is not formatted

  • Text that mermaid.js rejects is not changed. In a file, Prettier reports a syntax error and leaves the file as it is. In Markdown, the code block is left to Prettier, which prints it as code it does not format.
  • A few inputs that mermaid.js accepts are reported as syntax errors too. For example, a directive inside a keyword, as in sub%%{init: {}}%%graph S, and a click that does not start a click statement, as in subgraph Handle click events: in flowchart, click is a reserved word. An empty string between tokens, as in A-->|x""|B, is reported too. The full list is in docs/compatibility.md.
  • A text of only the word error, with comments, directives, and line breaks around it, is not changed, except that line endings follow endOfLine: mermaid.js reads it as its error pseudo-diagram. In Markdown, it is left to Prettier.

Guarantees and limitations…

Description from the npm listing.

  • prettier
  • prettier-plugin
  • mermaid
  • mmd
  • formatter

README badge

Show your rank in a README or on your website. The badge updates automatically.

Charts

Images: 30d · 1y · all time · 1600×900 dark

Adoption over time

prettier-plugin-mmd weekly downloads on npm, last 90 days: 362 weekly downloads as of Dec 5, 2026.prettier-plugin-mmdWeekly downloads on npm · Last 90 days362downloads / week02004006008001K1.2K1.4KSep 6Sep 21Oct 6Oct 21Nov 5Nov 20Dec 5downloads / weekobservedarchived (Internet Archive)no observationsSep 7, 2026 – Dec 5, 2026 · 90 observations · Updated Dec …pluginstats.com
prettier-plugin-mmd weekly downloads on npm, last 90 days: 362 weekly downloads as of Dec 5, 2026.

7/30/90-day growth

prettier-plugin-mmd weekly downloads growth on npm: +220% over 7 days, -51.2% over 30 days, 90-day growth unavailable.prettier-plugin-mmdWeekly downloads growth on npm362downloads / week now7-day growth+249 weekly downloads+220%30-day growth-380 weekly downloads-51.2%90-day growth+362 weekly downloadsInsufficient historyGrowth vs. nearest observation to each baseline date · Updated Dec 5, 2026pluginstats.com
prettier-plugin-mmd weekly downloads growth on npm: +220% over 7 days, -51.2% over 30 days, 90-day growth unavailable.

Ranking history

prettier-plugin-mmd npm ranking history: currently #2334 (by weekly downloads).prettier-plugin-mmdnpm ranking · by weekly downloads · Last 90 days#2334current rank#1400#1600#1800#2000#2200#2400#2600Sep 7Sep 22Oct 7Oct 22Nov 6Nov 21Dec 6rankOct 18, 2026 – Dec 6, 2026 · 44 observations · Updated Dec 5, 2026pluginstats.com
prettier-plugin-mmd npm ranking history: currently #2334 (by weekly downloads).

Listing placement

All npm3,247 listings · 163 pages · 1,084 shown · page 117, #14 (overall #2,334)
All npm: every listing in weekly downloads order

Listing placement

Prettier plugins267 listings · 14 pages · page 3, #20 (overall #60)
Prettier plugins: every listing in weekly downloads order

Filled points are observed values; hollow points come from Internet Archive snapshots of the listing page. Dashed segments span periods with no observations — values between points are not interpolated.

Each band is one page of 20. Weekly downloads on a linear scale. Placement is projected from weekly downloads, so it can differ from the marketplace's own sort order. Hover a dot to see the listing.

Recent observations

Full history (170)
Recent weekly downloads observations for prettier-plugin-mmd
Date (UTC)Weekly downloadsChange vs. previous
362-3
365+16
349+96
253+91
162+27
135-5
140+27
113+36
77-170
247-19
266-195
461-2
463-123
586—

Similar npm Prettier plugins plugins

All 20 prettier-plugin-mmd alternatives

Data source

Weekly downloads (trailing 7 complete days) come from the official npm downloads API. Downloads include CI and mirrors and are not equivalent to installs or users. npm publishes no ratings.

Listing: https://www.npmjs.com/package/prettier-plugin-mmd. First seen Oct 16, 2026; last successful collection Dec 6, 2026. See the methodology.