For repeatable Mermaid-to-PNG and Mermaid-to-PDF exports, start with the official Mermaid CLI (mmdc). It renders Mermaid source files directly to either format and can be used in scripts and build pipelines. If you prefer a browser, mermaid.tools documents both exports and detailed output controls; the official Mermaid Live Editor is a simple option for PNG, but its guide does not list PDF.
Which Mermaid renderer should you choose?
| Tool | PNG | Best fit | |
|---|---|---|---|
Mermaid CLI (mmdc) |
Documented | Documented | Local, repeatable rendering and automation |
| Mermaid Live Editor | Documented | Not listed in its consulted getting-started guide | Quick browser-based editing and PNG export |
| Mermaid Chart | Documented | Official pages conflict; verify in the editor or account | Browser editing with several documented export options |
| mermaid.tools | Documented | Documented | Browser exports with scale, padding, background and PDF page controls |
This is a comparison of documented features, not a rendering-quality or speed test. For a workflow that depends on PDF, the CLI is the clearest documented default. Choose a browser editor when manual export is more important than command-line automation.
As an Amazon Associate I earn from qualifying purchases.
Use Mermaid CLI for repeatable PNG and PDF output
The Mermaid CLI project describes its tool as “a command-line interface (CLI) for mermaid.” Its documentation says it accepts a Mermaid definition file and generates SVG, PNG or PDF. It also supports Mermaid code blocks embedded in Markdown, making it useful when diagrams live alongside project documentation.
Quick wins for a faster PC:
Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →Repair Windows errors before they cause bigger problemsFix Now →Scan for outdated or missing drivers - takes under a minuteDriver Scan →Install and render a diagram
- Install the CLI with npm:
npm install -g @mermaid-js/mermaid-cli. - Save Mermaid syntax in a file such as
diagram.mmd. - Render to PNG with
mmdc -i diagram.mmd -o diagram.png, or to PDF withmmdc -i diagram.mmd -o diagram.pdf. The output extension selects the format.
The README also documents stdin input, useful when another command generates the Mermaid text, and options including theme and transparent background for PNG. Installation routes include npm, local use, npx, Docker and Podman. The project marks Homebrew unsupported in its current README; container users should also note the documented Linux sandboxing and container-permission issues.
#1 Best Overall
- Wacom Intuos Small Graphics Drawing Tablet: Enjoy industry leading tablet performance in superior control and precision with Wacom's EMR, battery free technology that feels like pen on paper
- Works With All Software: Wacom Intuos tablet can be used in any software program to explore new facets of digital creativity; draw, paint, edit photos/videos, create designs, and mark up documents
- What the Professionals Use: Wacom's industry leading pen technology and pen to paper feeling makes it the preferred drawing tablet of professional graphic designers
- Software and Training Included: Only Wacom gives you software with every purchase. Register your Intuos tablet and gain access to some of the best creative software and Wacom's online training
- Wacom is the Global Leader in Drawing Tablet and Displays: For over 40 years in pen display and tablet market, you can trust that Wacom to help you bring your vision, ideas and creativity to life
If you build an integration around the CLI’s Node.js API rather than invoking the command, account for API changes: the project says that API is not covered by semver.
Choose a browser editor for manual exports
Mermaid Live Editor: straightforward PNG export
The official Mermaid Live Editor lets you write or paste Mermaid code in a browser and export PNG, SVG or Markdown. Its getting-started guide does not list PDF export, so do not rely on it for a PDF deliverable without confirming that the current editor offers one.
Rank #2
- Battery-Free Pen: StarG640 drawing tablet is the perfect replacement for a traditional mouse! The XPPen advanced Battery-free PN01 stylus does not require charging, allowing for constant uninterrupted Draw and Play, making lines flow quicker and smoother, enhancing overall performance
- Ideal for Online Education: XPPen G640 graphics tablet is designed for digital drawing, painting, sketching, E-signatures, online teaching, remote work, photo editing, it's compatible with Microsoft Office apps like Word, PowerPoint, OneNote, Zoom, Xsplit etc. Works perfect than a mouse, visually present your handwritten notes, signatures precisely
- Compact and Portable: The G640 art tablet is only 2 mm thick, it's as slim as all primary level graphic tablets, allowing you to carry it with you on the go
- Chromebook Supported: XPPen G640 digital drawing tablet is ready to work seamlessly with Chromebook devices now, so you can create information-rich content and collaborate with teachers and classmates on Google Jamboard’s whiteboard; Take notes quickly and conveniently with Google Keep, and effortlessly sketch diagrams with the Google Canvas
- Multipurpose Use: Designed for playing OSU! Game, digital drawing, painting, sketch, sign documents digitally, this writing tablet also compatible with Microsoft Office programs like Word, PowerPoint, OneNote and more. Create mind-maps, draw diagrams or take notes as replacement for mouse
The guide says edit history is stored in browser storage, autosaved every minute, and limited to the last 30 viewable edits. It also documents loading diagrams from a GitHub Gist. These are useful workflow details if you plan to return to a diagram later; they do not replace keeping a separate copy of important source.
Do these 3 things before closing this tab:
1Clear out junk files and repair common Windows errors2Scan for outdated or missing drivers - takes under a minute3Repair Windows errors before they cause bigger problemsMermaid Chart: verify PDF in your intended account
Mermaid Chart’s export guide documents PNG, SVG, PDF and MMD exports. A separate official feature page lists PNG, SVG and MMD, but not PDF. Because the official pages disagree, check the export menu and access in the account you intend to use before choosing Mermaid Chart for a PDF-dependent workflow.
Rank #3
- Large Active Drawing Space: UGEE M708 V3 graphic drawing tablet features 10 x 6 inch large active drawing space with papery texture surface, provides enormous and smooth drawing for your digital artwork creation, offers no-lag sketch and painting experience
- 16384 Passive Stylus Technology: A more affordable passive stylus technology offers 16384 levels of pressure sensitivity allows you to draw accurate lines of any weight and opacity according to the pressure you apply to the pen, sharper line with light pressure and thick line with hard pressure for artistry design or unique brush effect for photo retouching
- Compatible with Multiple System and Softwares: Powerful compatibility, tablet for drawing computer, perform well with Windows 11/10/8/7, Mac OS X 10.10 or later, Android 10.0 or later, mac OS 10.12 or later, Chrome OS 88 or later and Linux; Driver program works with creative software such as Photoshop, Illustrator, Macromedia Flash, Comic Studio, SAI, Infinite Stratos, 3D MAX, Autodesk MAYA, Pixologic ZBrush and more
- Ergonomically Designed Shortcuts: 8 customizable express keys on the side for short cuts like eraser, zoom in and out, scrolling and undo, provide a lot more for convenience and helps to improve the productivity and efficiency when creating with the drawing tablet
- Easy Connectivity for Beginners: The UGEE M708 V3 offers USB to USB-C connectivity, plus adapters for USB C, ensuring easy connection to various devices and allowing beginner artists to set up quickly and focus on their creativity without compatibility concerns; Whether using a laptop, desktop, chromebook, or tablet, the UGEE M708 V3 provides a seamless experience for those just starting their digital art journey
The export guide says PNG backgrounds can be default, transparent or custom; SVG is vector-based; and MMD retains editable Mermaid source. For PNG, use Export → PNG options to set the background. If diagram themes do not carry through, the guide recommends putting the theme in the diagram’s front matter instead of relying on editor preferences. It attributes excessive PDF whitespace generally to diagram size and suggests changing diagram direction or splitting a large diagram.
mermaid.tools: browser-based PNG and PDF controls
The independent mermaid.tools editor documents SVG, PNG, JPEG and PDF export. Its guide provides PNG scale, background and padding controls, along with PDF paper size and orientation. The site says rendering runs in the browser using the Mermaid library served by the site; it is independent of both Mermaid.js and Mermaid Chart.
Rank #4
- Working Area Configuration - HUION art tablet equips with a 10 x 6.25 inches working area, providing the user with the most comfortable size to work; the 10mm slim structure and minimalist design of appearance make the drawing tablet more attractive.
- Tilt Function Battery-free Stylus: This computer graphics tablet come with a battery-free stylus PW100, no need to charge, allowing for constant uninterrupted drawing. ±60° tilt support enables imitation of lines input with diverse drawing gestures, with accuracy ensured.
- Press Keys:12 programmable press keys plus 16 programmable soft keys, you can set shortcut keys on drawing tablet's driver based on your preferences, such as erase, zoom in/out, scroll up and down, and so on.
- Compatibility: HUION graphics tablet supports Windows 7 or later/ macOS 10.12 or later/ Android 6.0 or later/ Linux (Ubuntu). A USB adapter is required to connect to a Mac computer. H1060P supports various mainstream design and drawing software, including PS, SAI, AI, CDR, etc. (Please note: The H1060P is compatible with Ubuntu, but it requires the use of the Xorg display server. Wayland is not supported.)
- NOTE: You can easily connect your phone to the art tablet via the OTG connector; while iPhone and iPad are NOT at the moment. The cursor will not show up in the SAMSUNG Galaxy S series at present. If you are not sure whether the product is compatible with your Phone or any help, please contact us.
Check that the preview finishes without a parse error before exporting. The guide, updated 11 September 2026, says a 4× PNG export has sixteen times the pixels of a 1× export because both width and height are multiplied. Larger scale can help when a destination requires raster artwork, but it also grows the image quickly. For very large diagrams, the guide recommends SVG when the destination accepts it.
The same guide states that this editor rejects canvases above 16,384 pixels on either side or 16 megapixels in total. Those are mermaid.tools product limits, not universal Mermaid limits. If an export is oversized, its guide advises reducing scale or padding.
Best Value
- Ultra thin tablet: Active Area 4 x 3 inches. Fully utilizing our 8192 levels of pen pressure sensitivity―Providing you with groundbreaking control and fluidity to expand your creative output. Please note: The 4 x 3 inches is very small, please confirm that it will meet your needs before you purchase it
- OSU game: Designed for OSU! gameplay, drawing, painting, sketching, E-signatures etc. No need to install drivers for OSU! It's also designed for both right and left hand users
- Accurate Pen Performance: StarG430S computer graphics tablet is the perfect replacement for a traditional mouse! The XPPen advanced Battery-free PN01 stylus does not require charging, allowing for constant uninterrupted Draw and Play, making lines flow quicker and smoother, enhancing overall performance
- Compact and Portable: The G430S art tablet is only 2 mm thick, it’s as slim as all primary level graphic tablets,Ultra-thin and portable, allowing you hold it in one hand and carry it on the go. This graphic drawing tablet supports Mac. However, since the product interface is micro USB to USB-A, if your computer is a Mac and does not have a USB-A port, you will need to purchase an OTG transfer adapter to ensure compatibility with your Mac. So please confirm your computer port before you purchase it
- PLEASE NOTE: The XPPen StarG 430 is compatible with the Windows system 11/10/8/7(32/64 bit), and the Mac OS X version 10.10 or later, but it is incompatible with iOS and iPad OS. If your computer is a Mac, you need to grant permission to the Mac preferences first. Please go to our official website, and according to the guide: XPPen>Support>FAQ, find out the Star G430 and click, then click the question according to your Mac system. There are detailed guidelines for installing the driver so your tablet will work correctly. It's possible incompatible with the customer's own EMR system or other signature system. Please feel free to contact us to confirm the compatibility before your purchase
How to get a usable image or PDF
- For scripts and repositories: keep the Mermaid source in a file and use
mmdcwith the required output extension. This makes the documented PNG or PDF export reproducible. - For a one-off PNG in a browser: use the Live Editor or another browser tool, confirm the preview, then export.
- For PDF from a browser: mermaid.tools documents PDF and page setup; Mermaid Chart’s official export pages differ, so confirm availability in the intended account first.
- For print or sharp scaling: prefer SVG when the receiving app accepts it. Mermaid Chart describes SVG as scalable without quality loss; if PNG is mandatory, choose a scale appropriate to the final dimensions and check the result for pixelation.
- For a PDF with awkward whitespace: inspect diagram size and layout. Mermaid Chart’s guide suggests adjusting direction or splitting the diagram rather than assuming the export itself is broken.
What this comparison does not establish
The cited documentation establishes export formats and selected workflow controls, but does not establish comparative rendering quality, speed or compatibility across the tools. Kroki CLI is not included as a confirmed direct Mermaid renderer: although it supports PNG and PDF generally, its documented diagram-type list does not identify Mermaid.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

