Why is the Mermaid block not loading?

Mermaid is now a native block in GitBook. You don’t need to install or enable an integration to use it.

If your Mermaid diagram isn’t loading, check these common causes:

Check your Mermaid syntax

Syntax errors can stop the native Mermaid block from rendering.

  1. Review your Mermaid code for typos or missing characters.

  2. Compare it with examples in the Mermaid documentation.

  3. Test it in the Mermaid Live Editor if you want to isolate the issue.

Ensure that you are using a Mermaid block (and not a code block)

The native Mermaid block and a standard code block work differently. Mermaid code won’t render inside a standard code block.

To add a Mermaid block:

  1. Press /.

  2. Select Mermaid diagram.

Mermaid block selection in the GitBook editor

Working with older Mermaid blocks

If you created Mermaid content before native block support, GitBook converts older Mermaid blocks automatically the next time you edit the page.

Last updated

Was this helpful?