← Open Mermaid Studio

From source to a finished diagram.

Open a local UTF-8 .mmd, .mermaid or .txt file, write Mermaid directly, or choose an editable template. The workspace also offers this guide in English, 简体中文 and 繁體中文 under Help.

Write and check

flowchart LR
  A[Start] --> B{Ready?}
  B -- Yes --> C[Deliver]
  B -- No --> A

The first release supports flowchart, sequenceDiagram, classDiagram, stateDiagram-v2, erDiagram, gantt, pie and mindmap. Each has a starter and an original business example in Templates. Unsupported diagrams, external icon packs, mathematics, arbitrary HTML, links and custom CSS are not enabled.

Automatic preview waits briefly after typing. If source is invalid, the last successful diagram is clearly marked out of date and cannot be exported as the current diagram. Correct the source or use the error position when one is available. Source downloads work even if rendering fails.

Keyboard and canvas

Ctrl/Cmd F finds and replaces; Ctrl/Cmd Z undoes; Ctrl/Cmd S saves locally. Tab indents. Press Escape then Tab to leave the editor. Use the Source, Split view and Diagram tabs. On smaller screens, switch between source and diagram.

Use Fit to canvas, 100%, zoom in/out (10–400%), arrow keys or drag to inspect a diagram. These changes never alter the source or crop exported files.

Choose an output

Download .mmd for editable source, SVG for a complete scalable diagram with embedded fonts, or PNG at 1×, 2× or 3× with a white or transparent background. Chinese fonts and monochrome Emoji are included. Some uncommon Unicode sequences may lack a glyph. SVG files include several megabytes of fonts so they can work independently.

Print / save as PDF prepares the whole diagram on white paper with A4 or Letter, portrait or landscape, 12mm margins and an optional title. Choose Save as PDF in your browser's native dialog. Opening that dialog does not mean a file was saved. Large diagrams may become too small to read on one sheet.

Local drafts and backups

A temporary workspace is not saved automatically. Click Save locally to name a draft and enable autosave. Local drafts support opening, renaming, deletion, backup and restore. Restore never overwrites existing diagrams; exact duplicates are skipped. Multi-tab conflicts keep the current source and offer Save a copy.

Data stays in the current browser and is not synced or encrypted as a vault. Clearing site data, private browsing or closing before a write finishes can lose work. Keep a backup and download source before clearing storage. If storage fails, source download remains available.

Input and safety limits

Inputs are UTF-8, with an optional BOM. LF, CRLF and mixed LF/CRLF are preserved; standalone CR, binary files and invalid encoding are rejected. Editable source is limited to 256KiB and 5,000 lines. Rendering has smaller, per-type complexity limits, up to 800 non-comment lines and 4,096 characters per line. A failed or over-limit render never truncates source.

Render requests have an 8-second total deadline. Expensive Dagre layout runs in a Worker. Cancellation invalidates results immediately; a browser may take time to stop calculation, so a canceled active Worker retires for 3 seconds before a new layout starts. This is not a promise of instant CPU interruption.

PNG is limited to 8,192 pixels on either side and 16 million pixels total. Drafts are limited to 50 documents and 8MiB of source; backup files to 16MiB. Use source or SVG when a bitmap is too large.

Source configuration accepts a small documented allowlist: title, default/neutral/dark theme, #RRGGBB primary colour and 12px–24px text size. Source-defined values override the matching controls. Security, renderer, resource budgets and arbitrary styles cannot be overridden.

Privacy

Gantt omits the automatic today line for stable exports. Dark diagram themes use dark nodes on white or transparent paper; interface colour mode is independent.

Source, labels, filenames, drafts and exports are processed locally. Editor scripts and fonts are served from this site. Optional Google Analytics loads only with consent in the editor’s Help dialog; diagram source, titles and files are excluded. Withdraw consent in the same dialog. No cloud diagram storage or remote rendering service is used. Only fixed page views, tool identifiers and export formats are measured after consent; no diagram content is collected.