Skip to content
PluginStats

mermaid-formatter weekly downloads statistics

By chenyanchen · npm · Prettier plugins

A formatter for Mermaid diagram syntax

View on npm Fresh · Oct 17, 2026

mermaid-formatter has 144 recorded weekly downloads on npm, a decrease of 85.2% over the past 30 days.

It ranks #1629 of 2,251 tracked npm listings by weekly downloads.

Over 90 days, weekly downloads changed by -49.1%.

PluginStats has 121 daily observations since Jun 19, 2026; the latest is from Oct 17, 2026.

Weekly downloads
144
Official API · Oct 17, 2026
7-day growth
-64.3%
-259 weekly downloads
30-day growth
-85.2%
-831 weekly downloads
90-day growth
-49.1%
-139 weekly downloads
Rank
#1629
Among tracked npm listings

About mermaid-formatter

mermaid-formatter

A formatter for Mermaid diagram syntax.

Features

• Format all Mermaid diagram types (sequenceDiagram, flowchart, classDiagram, etc.) • Normalize indentation and whitespace • Format Mermaid code blocks in Markdown • CLI tool and programmatic API • Zero dependencies (lightweight)

Installation

Usage

CLI

Prettier Plugin

Programmatic API

API Reference

formatMermaid(input: string, options?: FormatOptions): string

Format Mermaid diagram source code.

Options:

• indentSize (number, default: 4) - Number of spaces for indentation • useTabs (boolean, default: false) - Use tabs instead of spaces

formatMarkdownMermaidBlocks(markdown: string, options?: FormatOptions): string

Format all Mermaid code blocks in a Markdown document.

parse(input: string): Diagram

Parse Mermaid source into an AST.

detectDiagramType(input: string): DiagramType

Detect the diagram type from source code.

Formatting Rules

• Diagram declaration at column 0 • Block keywords (critical, alt, loop, par, opt, break, rect, subgraph, end) indented based on nesting depth • Block continuations (else, option, and) at same level as their opening block keyword • Content inside blocks indented by configured amount • Consecutive blank lines collapsed to single blank line • Trailing blank lines removed • Blank line inserted before block starts • Arrow messages normalized when line matches from ARROW to: message pattern (A->>B:msg → A ->> B: msg) • Flowchart class syntax is preserved (A --> B:::warning is not treated as arrow message) • Whitespace normalized (multiple spaces → single, bracket padding removed)

Supported Diagram Types

• sequenceDiagram • flowchart / graph • classDiagram • stateDiagram / stateDiagram-v2 • erDiagram • journey • gantt • pie • quadrantChart • requirementDiagram • gitGraph • mindmap (preserved, indent-sensitive) • timeline (preserved, indent-sensitive) • sankey-beta • xychart-beta • block-beta • architecture-beta

Editor Integration

See Integrations Guide for:

• VS Code setup (tasks, run-on-save) • Pre-commit hooks • GitHub Actions • Prettier plugin

Contributing

Issues and PRs welcome! See GitHub Issues.

License

MIT

Description from the npm listing.

  • mermaid
  • formatter
  • prettier
  • prettier-plugin
  • diagram
  • markdown
  • sequence-diagram
  • flowchart
  • ast

Where mermaid-formatter sits in the listing

Each band is one page of 20. Weekly downloads on a log 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.

All npm2,248 listings · 113 pages · page 82, #10 (overall #1630)
All npm: every listing in weekly downloads order
PNG SVG
Prettier plugins241 listings · 13 pages · page 3, #14 (overall #54)
Prettier plugins: every listing in weekly downloads order
PNG SVG

Charts

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

Adoption over time

mermaid-formatter weekly downloads on npm, last 90 days: 144 weekly downloads as of Oct 17, 2026, -49.1% over 90 days.mermaid-formatterWeekly downloads on npm · Last 90 days144downloads / week-49.1% over 90 days05001K1.5K2KJul 19Aug 3Aug 18Sep 2Sep 17Oct 2Oct 17downloads / weekobservedarchived (Internet Archive)no observationsJul 20, 2026 – Oct 17, 2026 · 90 observations · Updated Oc…pluginstats.com
mermaid-formatter weekly downloads on npm, last 90 days: 144 weekly downloads as of Oct 17, 2026, -49.1% over 90 days.
PNG SVG

7/30/90-day growth

mermaid-formatter weekly downloads growth on npm: -64.3% over 7 days, -85.2% over 30 days, -49.1% over 90 days.mermaid-formatterWeekly downloads growth on npm144downloads / week now7-day growth-259 weekly downloads-64.3%30-day growth-831 weekly downloads-85.2%90-day growth-139 weekly downloads-49.1%Growth vs. nearest observation to each baseline date · Updated Oct 17, 2026pluginstats.com
mermaid-formatter weekly downloads growth on npm: -64.3% over 7 days, -85.2% over 30 days, -49.1% over 90 days.
PNG SVG

Ranking history

mermaid-formatter npm ranking history: currently #1629 (by weekly downloads).mermaid-formatternpm ranking · by weekly downloads · Last 90 days#1629current rank#1627#1628#1629#1630#1631Jul 20Aug 4Aug 19Sep 3Sep 18Oct 3Oct 18rankOct 18, 2026 – Oct 18, 2026 · 1 observations · Updated Oct 17, 2026pluginstats.com
mermaid-formatter npm ranking history: currently #1629 (by weekly downloads).
PNG SVG

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.

Recent observations

Full history (121)
Recent weekly downloads observations for mermaid-formatter
Date (UTC)Weekly downloadsChange vs. previous
144-41
185-5
190-123
313-107
4200
420-36
456+53
403-185
588-350
938-157
1,095-263
1,358-281
1,639-134
1,773—

Similar npm Prettier plugins plugins

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/mermaid-formatter. First seen Oct 16, 2026; last successful collection Oct 18, 2026. See the methodology.