First identify the diagram language in your source file: PlantUML and Mermaid use different renderers. For PlantUML, run the PlantUML command-line tool to create a PNG by default, or select SVG or another supported format. For Mermaid, use Mermaid CLI to export the definition as SVG, PNG, or PDF.
Identify the diagram language first
Check the source file and its syntax before choosing a converter. PlantUML source is rendered by PlantUML; Mermaid definitions need Mermaid CLI. They are not interchangeable, and neither tool is a universal converter for every kind of UML code.
As an Amazon Associate I earn from qualifying purchases.
- Use PlantUML if the source is written in PlantUML syntax, commonly saved with a
.pumlextension. - Use Mermaid CLI for a Mermaid definition, commonly saved as
.mmd. - If the file uses another diagram language, find a renderer for that language rather than assuming either tool will parse it.
Convert PlantUML code with the local command line
With Java and the PlantUML JAR available, open a terminal in the directory containing the diagram and run:
java -jar plantuml.jar diagram.puml
PlantUML creates a PNG by default. Replace diagram.puml with your source filename. The basic command can also process multiple files, for example:
#1 Best Overall
- Used Book in Good Condition
java -jar plantuml.jar file1 file2 file3
PlantUML documents processing files and directories; the exact installation steps depend on how you obtained the JAR or packaged build, so make sure the command points to the correct file.
Choose SVG or another output format
To request SVG, use the documented output option:
java -jar plantuml.jar --svg diagram.puml
The CLI also supports -f svg and documents PDF and other output formats. Confirm that the particular diagram type supports the format you want: not every PlantUML diagram can be rendered as SVG. If SVG is unavailable for that type, try PNG.
Rank #2
Control source metadata in PNG files
PlantUML PNG output can contain encoded source metadata. Use -nometadata to disable embedding it. The CLI also provides -metadata to extract metadata from a local PNG.
Render PlantUML through PlantUML Server
If you do not want to run the local CLI, PlantUML Server accepts encoded diagram source in a URL. Its documented route patterns are:
Rank #3
/plantuml/png/ENCODED
/plantuml/svg/ENCODED
Use the PNG route for a raster image or the SVG route for a vector image, subject to the diagram type’s format support. The source must be encoded in the form expected by the server; a raw PlantUML text file cannot simply be appended unchanged to the route.
The server documentation also describes deploying PlantUML Server on your own Java web server. The current documentation specifies Tomcat 10 because of the transition from javax.* to jakarta.*; check the requirements for the specific version you plan to install. The documentation describes the interface and deployment, but does not establish a hosted service’s source-retention or privacy terms. For control over where source is processed, prefer a local renderer or a server you operate.
Rank #4
Convert Mermaid diagram code with Mermaid CLI
For Mermaid source, use Mermaid CLI rather than PlantUML. Given an input file named input.mmd, the documented SVG command is:
mmdc -i input.mmd -o output.svg
Mermaid CLI can also generate PNG or PDF by setting the output filename extension accordingly:
mmdc -i input.mmd -o output.png
mmdc -i input.mmd -o output.pdf
The project README documents installation through npm, with Docker and Podman instructions as alternatives. Follow the installation method appropriate to your environment, then run the command from the location of the input file or provide its path. This workflow applies to Mermaid definitions, not arbitrary PlantUML or other UML source.
Choose PNG, SVG, or PDF
| Format | Use it when | Important qualification |
|---|---|---|
| PNG | You need a raster image that works in a wide range of viewers, or your diagram type does not support SVG. | PlantUML’s default output is PNG. |
| SVG | You need a vector image that scales cleanly for many web and documentation uses. | PlantUML and Mermaid CLI document SVG output, but PlantUML does not support SVG for every diagram type. |
| You need an output suited to a document or print workflow. | Both PlantUML CLI and Mermaid CLI document PDF output. |
Use the format option or output extension documented by the renderer you chose. An unsuccessful render can indicate a syntax problem or that the requested format is unsupported for the diagram type; the format documentation does not establish one universal error message or fix.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Troubleshoot a failed conversion
- The command cannot find the JAR or input file: run the command from the directory containing the files, or use their full paths. Check that the JAR filename matches the one on your system.
- The output is not the format you expected: PlantUML produces PNG by default. Select SVG or another documented format explicitly; Mermaid CLI uses the output filename extension.
- PlantUML SVG output does not work for a diagram: that diagram type may not support SVG. Try PNG instead.
- The CLI rejects the source: confirm that you selected the renderer for the source language and check the diagram syntax. PlantUML and Mermaid are distinct formats.
- You need to render without sending source to a hosted service: use the local CLI, or deploy a server you operate. The hosted server documentation cited here does not establish data-retention terms.
Or skip the browser setup
If your goal is to capture a rendered diagram in a browser, ScreenshotNeo is a website screenshot API and MCP server; it captures a URL as PNG, JPEG, WebP, or PDF. It does not convert raw PlantUML or Mermaid source by itself: render the diagram to a page first, then capture that page.
PC Slower Than It Used to Be?
A free scan shows the junk files, broken settings and background clutter dragging Windows down - then fixes them in one click.Free scan · Windows 10 & 11Crashes, No Sound, or Screen Glitches?
Random freezes, missing sound and display glitches usually trace back to one bad driver. Find and replace yours safely.Free scan · under a minuteFor a simple capture, create an API key and use this cURL request. The response is saved as a WebP image; see the ScreenshotNeo API documentation for output and capture options.
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp
ScreenshotNeo accepts cookie and consent banners before capture and removes more than 60 known consent platforms, newsletter popups, and chat widgets; those steps can be turned off. Bot checks, CAPTCHAs, blank pages, timeouts, failed loads, and cache hits are not billed, and response headers report the page verdict and billing status. Its MCP server provides take_screenshot, get_page_info, and capture_pdf tools for Claude, Cursor, and other MCP clients. The free plan includes 1,000 screenshots per month with no card; paid plans start at $5 for 3,000 shots.
Sign up for ScreenshotNeo’s free plan to get 1,000 screenshots a month with no card.
Quick Recap
Official documentation
- PlantUML command line covers local file and format options.
- PlantUML Server documents the encoded PNG and SVG routes and server deployment.
- Mermaid CLI on GitHub documents installation and export commands.
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.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.




