A Mermaid diagram editor with live preview, in your Markdown

Markdly is a Markdown editor with a live Mermaid preview, built for diagrams that live inside a document: notes, a spec or a README you're writing. Write a mermaid code block in a .md file and Visual draws it as you edit, on Mac, Windows, Linux, iPhone, iPad and Android, with no connection. It's a paid app with a sign-in.

  • Code and diagram together: Split shows the Markdown and the drawn diagram at once.
  • Plain text: the diagram stays as code in your own .md file.
  • In the PDF: diagrams are drawn on the page, on every platform.

$19.99 once, no subscription.

Where to edit a Mermaid diagram

  • Free

    Mermaid Live Editor

    Cost
    Free
    Good for
    One diagram, right now. Mermaid's docs describe a Code panel, a Preview panel and a Configuration panel, with sample diagrams to start from.
    The catch
    It's a website that holds one diagram at a time. The docs say history is kept in browser storage only: edits are saved every minute and the last 30 are viewable.

    Mermaid docs: Mermaid User Guide (Using the Mermaid Live Editor)

  • Free

    GitHub

    Cost
    Free
    Good for
    Diagrams in a README, an issue, a pull request, a discussion or a wiki. GitHub draws a mermaid code block there, and .mermaid and .mmd files in a repository.
    The catch
    GitHub chooses the Mermaid version; its docs say a block containing only info shows which. They also warn of errors if you run a third-party Mermaid plugin.

    GitHub Docs: Creating diagrams

  • Free

    VS Code's Markdown preview

    Cost
    Free
    Good for
    Markdown files on a computer. Microsoft says the built-in preview renders Mermaid diagrams in mermaid fenced code blocks, and Ctrl+K V (⌘K V on a Mac) puts the preview beside the text.
    The catch
    It's a code editor: a good fit if you already work in one, a lot to set up for one diagram.

    Visual Studio Code docs: Markdown and Visual Studio Code

  • Our app

    Markdly

    Cost
    $19.99 once, or every premium Bravely utility for $95.99/yr or $399 once
    Good for
    Diagrams that belong to a document: notes, a spec or a README you're writing, on a computer or a phone.
    The catch
    It's a paid app with a sign-in, and it's a document editor, not a diagram tool.

How to write a Mermaid diagram in Markdly

  1. Open the Markdown file

    Open the .md file the diagram belongs in. Get Markdly first if you don't have it, and sign in with your Bravely Account.

  2. Choose Split

    Pick Split at the top to see Markdown and Visual together: side by side on a computer, an iPad or an Android tablet, and stacked on a phone. On a Mac the key is ⌘3; on Windows it's Ctrl+\.

  3. Write the mermaid block

    On the Markdown side, type three backticks followed by mermaid on a line of its own. Write the diagram's code on the lines under it, then close the block with three more backticks.

  4. Watch Visual draw it

    Visual draws the diagram. Change the code and it's drawn again.

    Diagram could not be drawn means the code has a mistake. Fix it on the Markdown side.

  5. Or edit it from Visual alone

    You don't need Split. In Visual, click or tap the diagram and its code appears in its place. Move the cursor out of the block and the diagram is back.

  6. Send it

    The file is still plain text, so GitHub and VS Code draw the same block when someone opens it there. To send the drawn page instead, make a PDF: Markdown to PDF has each platform's menu.

A diagram inside the document it explains

In a live editor, the diagram is the whole page. In a Markdown file it's one block among your headings, tables and paragraphs, and it changes with them: edit the flowchart in the same place you edit the sentence that describes it.

Markdly draws the block with an engine that's a file inside the app, on every platform, phones included. Nothing is fetched to draw a diagram, so it works on a train or behind a firewall. In Visual the diagram's colors follow the app's light or dark look.

LaTeX math works the same way: write it between dollar signs and Visual typesets it, from an engine inside the app.

Sending a document that has diagrams

A PDF is the simplest thing to send. Markdly waits for the diagrams to finish drawing before it makes the pages, and the page is always white with dark text, whatever look the app is in.

On Mac, Windows, Linux, iPhone and iPad you can also save the document as HTML. If it has diagrams or math, that one file carries the engines inside it, so any browser draws the diagrams with no connection. They're drawn by a script in the file, not saved as pictures, so the reader's browser needs scripts on. Pictures in your document stay as links.

What Markdly doesn't do with Mermaid

  • You write code. There's no dragging shapes onto a canvas.
  • It doesn't save a diagram by itself as an image file.
  • The engine is the one inside the app, so syntax from a newer Mermaid release may not draw until Markdly updates.
  • A mistake in the code gets one message, with no pointer to the line.
  • Diagrams aren't carried into Markdly's other document formats. A Word, EPUB, LaTeX or slide file gets the block as code.
  • Click actions inside a diagram do nothing in Markdly. In an HTML file saved from the Mac app, a link written with click and href still opens.

FAQs

Is there an official Mermaid live editor?

Yes: the Mermaid Live Editor at mermaid.live, from the Mermaid project, and it's free. Its README also describes a link to a viewer of your diagram, a link someone else can edit from, and a Docker image for running your own copy.

Can I edit Mermaid diagrams offline?

In Markdly, yes: the engine that draws them is inside the app. Signing in needs a connection, and after a purchase Markdly keeps working for up to 72 hours between checks of your account. The Live Editor's README has a Docker image for running it on your own machine.

Which Markdown editors support Mermaid?

The three on this page do: VS Code in its built-in Markdown preview, GitHub wherever it shows Markdown, and Markdly in Visual.

Can I export a Mermaid diagram as a PNG or SVG?

From the Mermaid Live Editor, yes: its docs list PNG, SVG and Markdown. Markdly doesn't make an image of one diagram; it draws the diagram in the PDF of the whole document.

What file format does a Mermaid diagram use?

Text. In a Markdown file it's a fenced code block marked mermaid. GitHub also displays files with a .mermaid or .mmd extension. Markdly opens Markdown and plain text files, so there the diagram goes in a block.

Does Mermaid work in Markdly on a phone?

Yes. The iPhone, iPad and Android apps draw the same diagrams as the computer apps, from the same engine, and Split is stacked on a phone.

Markdly icon

Markdly

Native markdown editor

$19.99 once, no subscription.