Diagram type
Preview

Start typing a diagram or pick a template.

New diagram

Mermaid templates

Share

The diagram lives in the link itself and is never sent to a server.

Settings

Page theme One theme for every page of this site. System follows the theme of your device.
Redraws the diagram as you type. When off, it redraws only on Render or Ctrl+Enter (Cmd+Enter on a Mac); turn it off for large PlantUML diagrams that draw slowly.

Keyboard shortcuts

These shortcuts work with a connected keyboard.

Ctrl+Enter
Redraw the diagram now
Ctrl+Z
Undo
Ctrl+Shift+Z or Ctrl+Y
Redo
Esc
Close the menu, a list, a panel or a dialog
← or →
On the divider between the code and the diagram: move it by 2%
Home or End
On the divider: the code takes 20% or 60% of the width

Help

  1. Menu: new diagram, import, settings, page theme, shortcuts, help.
  2. Diagram name: opens your diagrams; New, Rename, Delete.
  3. Mermaid or PlantUML: the engine that draws this diagram.
  4. History, Share, Export: versions, a link with the diagram inside, PNG and SVG.
  5. Code and Config: the text of the diagram and its Mermaid settings.
  6. Status line: an error and its line; Render when Auto-update is off.
  7. Zoom: Fit, minus, the zoom level, plus; drag or pinch to move.
  8. Colors & layout: palette, theme and layout of this diagram.
  9. Diagram: redraws as you type; templates on an empty one.

Top bar

  • Menu. The button with three lines at the top left opens the menu: New diagram, Duplicate diagram, Import file…, Settings…, Dark theme (Light theme on a dark page), Keyboard shortcuts… and Help. Esc or a press outside closes it.
  • Duplicate diagram. Makes a copy of the active diagram and switches to it.
  • Import file. Import file… opens a Mermaid or PlantUML file from your computer as a new diagram. The file is read in the browser and never sent anywhere.
  • Dark theme. Dark theme switches the page to the dark theme at once, and on a dark page the same item is Light theme. The choice is kept in this browser for every page of the site, see Page theme.
  • Keyboard shortcuts. Keyboard shortcuts… lists the keys of the page: Ctrl+Enter redraws the diagram, Ctrl+Z and Ctrl+Shift+Z undo and redo, Esc closes the menu, a list, a panel or a dialog. On the divider the arrow keys move it by 2%, and on a Mac the keys are Cmd+Enter, Cmd+Z and Cmd+Shift+Z.
  • Help. Opens this window, which works offline too.
  • Diagram list. The name of the active diagram with its arrow opens your diagrams at the left edge, see Your diagrams.
  • Mermaid and PlantUML. The Diagram type switch picks the engine that draws the code. Each diagram keeps its own type.
  • History. The History button with the clock opens the earlier versions of the active diagram at the right edge, and Restore brings one back after saving the current text as a version, so a restore can be undone. A version is saved at most once a minute and at once with Save version, and each diagram keeps its last 20 versions in this browser.
  • Share. Share opens a link to this diagram with its type, colors, theme and layout, and Copy link puts it on the clipboard. They travel in the link's #fragment, which the browser never sends to a server.
  • Export. Export at the top right downloads the diagram in the format you picked last, PNG at first.
  • Export formats. The arrow next to Export opens the list. Download as has a button for each file, PNG and SVG, and the filled one is the format Export downloads. PNG scale and PNG background set the picture: Page fills it with the page color, Transparent leaves it transparent.
  • Code | Diagram. On a screen under 768 px wide this switch shows the Code or the Diagram one at a time, the code first. The menu then also holds Mermaid or PlantUML and History, the Colors & layout button stands in the top bar, and Export at the bottom of the diagram.

Code

  • Code. The Code tab over the editor holds the text of the diagram in the language of the active engine. The diagram redraws as you type, see Auto-update.
  • Config (JSON). The Config tab next to Code shows the Mermaid settings line at the top of the code as JSON, and an edit here rewrites that line; Colors & layout write into the same line. PlantUML has no such tab, its settings are lines of the code. Keys that would loosen the page's protection are ignored: securityLevel, secure, startOnLoad, dompurifyConfig, maxTextSize, maxEdges and themeCSS. The field holds up to 4000 characters. The line is part of the code, so it is saved with the diagram and carried in the Share link.
  • Undo and Redo. The Undo and Redo buttons over the code do the same as Ctrl+Z and Ctrl+Shift+Z or Ctrl+Y. On a tablet they are items of the menu.
  • Autocomplete. Suggestions appear as you type in the editor. Enter or Tab accepts one, Ctrl+Space opens the list by hand.
  • Search. Ctrl+F in the editor opens search and replace.
  • Status line. The line under the code shows the error of the code, and Line N at its start puts the cursor on that line. With Auto-update off it says the preview is out of date, and its Render button draws the diagram.

Diagram

  • Zoom and move. Zoom the Preview with the āˆ’ and + buttons in its top right corner (at its bottom on a phone), with Ctrl and the mouse wheel, or with a pinch of two fingers. Drag the diagram to move it.
  • Fit and the zoom level. Fit scales the diagram to the preview. The number between āˆ’ and + shows the zoom level, a press on it shows the diagram at its natural size, 100%.
  • Divider. The divider between the code and the diagram can be dragged to give the code from 20% to 60% of the width, and the choice is kept in this browser. When it has focus, the left and right arrow keys move it by 2%, Home and End move it to its limits. A phone (under 768 px) and an upright tablet have no divider.
  • Colors & layout. The eye button Colors & layout at the bottom left corner of the diagram opens the Colors & layout panel with the palette, the theme and the layout below, see View options. On a phone the button stands in the top bar, and the panel slides up from the bottom of the window.
  • Pick a template. An empty diagram shows templates over the preview, Mermaid and PlantUML ones in groups named after their engine, the active engine first. A template fills the diagram with its text and switches it to that engine.
  • Start from a template. On the first visit, while this browser keeps only the untouched example diagram, the strip Start from a template under the diagram offers three templates of the selected engine and two of the other one. They stand in two groups, each named once by its engine, Mermaid or PlantUML, and every tile keeps its whole name: a tile that doesn't fit the strip is left out, All templates… still has it. All templates… opens the New diagram dialog, and Close templates hides the strip for good.

View options

  • Diagram colors. Plain keeps the usual colors of the engine, Colorful paints the diagram in several bright colors and writes them into the code. A Diagram theme other than Page theme takes over from both.
  • Diagram theme. Page theme draws the diagram light or dark to match the page and writes nothing into the code. The other themes are built into Mermaid or PlantUML, and the one you pick is written at the top of the code. A theme other than Page theme takes over from Diagram colors.
  • Graph layout. The options under it change how the engine places boxes and lines: in Mermaid only in flowcharts, in PlantUML only in class, component, use case, deployment and C4 diagrams. For other diagrams the panel hides them and says so.
  • Line shape. Mermaid draws the lines between boxes Curved, Straight or Stepped.
  • Line routing. PlantUML draws the lines between boxes its Default way, at right angles with Ortho, or as straight segments with Polyline.
  • Node gap. Space between boxes on the same level of the graph, in Mermaid and PlantUML alike: Compact, Normal or Wide.
  • Rank gap. Space between the levels of the graph along its arrows, in Mermaid and PlantUML alike: Compact, Normal or Wide.
  • Settings in the code. Every choice of this panel is written into the code of the diagram, and the panel reads it back from there, so the code pasted into another editor, such as mermaid.live or plantuml.com, draws the same diagram. In Mermaid it is one line at the top, for example %%{init: {"theme":"forest"}}%%, the same line the Config tab shows as JSON. In PlantUML these are lines after @startuml, for example !theme sketchy and skinparam linetype ortho, and Colorful puts its colors between ' colors: colorful and ' end colors. Ctrl+Z takes a change back, and Page theme with the default options leaves the code as it was.

Settings

  • Page theme. System, Light or Dark in Settings… of the menu. One theme for every page of this site. System follows the theme of your device.
  • Auto-update. The Auto-update switch in Settings… of the menu. Redraws the diagram as you type. When off, it redraws only on Render or Ctrl+Enter (Cmd+Enter on a Mac); turn it off for large PlantUML diagrams that draw slowly. The choice is kept in this browser and never goes into a link.

Saving and sharing

  • Your diagrams. The Diagrams panel keeps the list of your diagrams: a name in the list switches to it, New adds one, Rename and Delete change the selected one. When there are many diagrams, the list scrolls inside its frame. Esc, the cross or a press outside the panel closes it.
  • New diagram. New diagram in the menu opens a dialog. The Mermaid / PlantUML switch in the dialog picks the engine, and on opening it stands on the engine of the active diagram. The first tile, Example, starts a diagram with the example of that engine, and each template after it starts one with the template's text.
  • Copy image. Copy image over the diagram, right of Preview, puts a PNG of the diagram on the clipboard, with the PNG scale and PNG background of the Export list. If the browser can't do that, a note under it says why, and PNG in the Export list still downloads the image.
  • Copy code. Copy over the code, before Undo and Redo, puts the diagram source on the clipboard; for a moment the button says Copied.
  • In this browser. Diagrams, their versions and the settings are stored in this browser only and never sent to a server. To take a diagram elsewhere, use Share or Export.
  • Offline. After the first visit the page opens and renders diagrams offline, with no network.