Mermaid to JPG converter

Paste Mermaid code and download a JPG at the size and quality you choose. JPEG works everywhere, from old CMSs to chat apps that reject PNG and SVG. Free and runs in your browser.

flowchart LR
    A[Write Mermaid] --> B[Preview it]
    B --> C{Looks right?}
    C -->|No| A
    C -->|Yes| D([Export the image])
Loading the tool…

How to do it

  1. Step 1

    Paste your code

    Paste your Mermaid code into the box above.

  2. Step 2

    Choose a look

    Pick a theme and a background colour.

  3. Step 3

    Size and quality

    Set the size and the JPEG quality.

  4. Step 4

    Download the JPG

    Click Download JPG, or Copy image to paste it somewhere.

JPEG and diagrams

JPEG was designed for photographs, where smooth gradients hide compression. Diagrams are the opposite: flat colour and sharp edges. That is why the quality setting starts high here, and why the image is drawn at twice its natural size by default, so the edges survive compression.

Where JPG is the only option

Some platforms still only take JPEG uploads, including older content management systems, form builders and a few learning platforms. For those, this is the format that just works.

What this does not do

  • JPEG compression can soften thin lines and small labels. Keep the quality at 90% or higher for diagrams.
  • There is no transparency in JPEG; the background is always solid.

Frequently asked questions

When should I use JPG instead of PNG?

Use JPG when the place you are uploading to only accepts JPEG, or when you want the smallest file for an email or a ticket. For documentation and slides, PNG or SVG usually look crisper, because JPEG compression can blur thin lines and small text.

Can a JPG have a transparent background?

JPEG has no transparency, so the image always has a solid background. Choose the theme background or white; if you pick Transparent, the tool fills it with white.

What quality setting should I use?

90% keeps text sharp while making the file several times smaller than a PNG. Go to 100% if you see smudging around letters, or down to 75% if size matters more than crispness.

Can I set an exact image size?

Yes. Switch the size from Auto to Width or Height and enter the number of pixels. The other side follows the diagram's shape.

More Mermaid tools

All tools