Skip to content
Lower pricing Individual licenses are now $49/year for Studio, $25 for Core — See pricing →

Import and Export

Last updated:

Export and import move a theme between machines as a single JSON file. Diagrams you already applied the theme to need nothing, because applying writes the colors into each file’s frontmatter (see What applying writes).

  1. Open the IDE settings ( Command + Comma Control + Alt + S ) and go to Tools > Mermaid Studio > Custom Themes.

  2. Select the theme in the list and click Export….

  3. Choose a location and file name.

  1. Open the same settings page and click Import….

  2. Choose the JSON file.

  3. If a theme with the same id already exists, a Theme ID Conflict dialog names the existing theme and asks whether to assign a new id. Click Assign New ID to keep both, or cancel and remove the old theme first if the file is meant to replace it.

  4. The imported theme appears in the list, enabled, and shows up in the Appearance menu right away.

The plugin validates the file before storing it, and a rejected file lists the problems it found. These rules matter when you hand-edit an exported file.

  • Write colors as six-digit #rrggbb hex values.
  • Theme ids are 3 to 50 lowercase characters (a-z, 0-9, -, _), and names are 3 to 50 characters.
  • The ms- id prefix is reserved for bundled custom themes.
  • Keep the file under 1 MB, in a format version the installed plugin supports.

Importing preserves the theme’s id, so a diagram applied on one machine resolves to the same theme on another, and the Light/Dark toggle in the Appearance menu keeps working.