<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: river jiang</title>
    <description>The latest articles on DEV Community by river jiang (@river_jiang_670cccce7d97d).</description>
    <link>https://dev.to/river_jiang_670cccce7d97d</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3856668%2F58f8b7fb-e134-4876-8bb1-312d64272f38.png</url>
      <title>DEV Community: river jiang</title>
      <link>https://dev.to/river_jiang_670cccce7d97d</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/river_jiang_670cccce7d97d"/>
    <language>en</language>
    <item>
      <title>I wanted cleaner beautiful Mermaid diagrams for docs, so I made a small exporter</title>
      <dc:creator>river jiang</dc:creator>
      <pubDate>Thu, 04 Jun 2026 07:56:46 +0000</pubDate>
      <link>https://dev.to/river_jiang_670cccce7d97d/i-wanted-cleaner-beautiful-mermaid-diagrams-for-docs-so-i-made-a-small-exporter-3b6</link>
      <guid>https://dev.to/river_jiang_670cccce7d97d/i-wanted-cleaner-beautiful-mermaid-diagrams-for-docs-so-i-made-a-small-exporter-3b6</guid>
      <description>&lt;p&gt;I use Mermaid diagrams a lot when I am trying to explain something that is easier to see than to read.&lt;/p&gt;

&lt;p&gt;A release flow. A service talking to another service. A small state machine. The kind of diagram that belongs in a README, an architecture note, or a planning doc.&lt;/p&gt;

&lt;p&gt;Mermaid itself is great for that. Plain text, versionable, reviewable. The part that kept annoying me was what happened after the diagram looked right.&lt;/p&gt;

&lt;p&gt;I often wanted a clean image for a README, a slide, or a blog post. Not a rough screenshot. Not something with awkward padding. Not a diagram that looked fine in one place and slightly blurry everywhere else.&lt;/p&gt;

&lt;p&gt;So I made a small tool for that:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://mermaidonline.org/?utm_source=devto&amp;amp;utm_medium=community&amp;amp;utm_campaign=launch_mermaidonline_202606&amp;amp;utm_content=showdev_docs" rel="noopener noreferrer"&gt;Mermaid Online&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgcfuoryazfojs0ha7gtd.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgcfuoryazfojs0ha7gtd.png" alt=" " width="800" height="492"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It is a browser-based Mermaid editor and exporter. Paste Mermaid code, preview it, adjust the export style, then download PNG, SVG, JPG, WebP, or PDF.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fw30o4uwfurogncc56ykp.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fw30o4uwfurogncc56ykp.png" alt=" " width="800" height="475"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;No signup. No watermark. The core render/export workflow happens in the browser.&lt;/p&gt;

&lt;h2&gt;
  
  
  The problem I wanted to smooth out
&lt;/h2&gt;

&lt;p&gt;Here is a tiny example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;flowchart LR
  A[Write the doc] --&amp;gt; B[Sketch the flow]
  B --&amp;gt; C[Preview the diagram]
  C --&amp;gt; D[Export for README]
  C --&amp;gt; E[Export for slides]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That is easy enough to write.&lt;/p&gt;

&lt;p&gt;But when I need to put it somewhere, I usually start making small judgement calls:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Should this be SVG or PNG?&lt;/li&gt;
&lt;li&gt;Does it need a transparent background?&lt;/li&gt;
&lt;li&gt;Is 1x too soft for a slide?&lt;/li&gt;
&lt;li&gt;How much padding should the diagram have?&lt;/li&gt;
&lt;li&gt;Will it still be readable in a GitHub README?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;None of these are hard problems. That is partly why they are annoying. They are small enough that I do not want to open a design tool, but visible enough that a sloppy export makes the whole doc feel less cared for.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fuf3oo9r7ym13hkrbv78p.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fuf3oo9r7ym13hkrbv78p.png" alt=" " width="800" height="481"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What Mermaid Online does
&lt;/h2&gt;

&lt;p&gt;The tool is intentionally simple.&lt;/p&gt;

&lt;p&gt;You paste or edit Mermaid code on the left, check the live preview, then choose the export format and style.&lt;/p&gt;

&lt;p&gt;The formats I cared about most:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;PNG for README files, docs, and slides&lt;/li&gt;
&lt;li&gt;SVG when I want a vector asset&lt;/li&gt;
&lt;li&gt;PDF for handoff or document workflows&lt;/li&gt;
&lt;li&gt;WebP for lightweight blog images&lt;/li&gt;
&lt;li&gt;JPG when I need the boring compatible option&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;There are also presets for common destinations: clean docs, GitHub README, transparent backgrounds, dark docs, slides, and blog-style cards.&lt;/p&gt;

&lt;p&gt;That last bit matters more than I expected. A diagram for a README and a diagram for a presentation usually should not have exactly the same padding, background, and scale.&lt;/p&gt;

&lt;h2&gt;
  
  
  A workflow that feels right to me
&lt;/h2&gt;

&lt;p&gt;For documentation, I usually do this:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Write the Mermaid diagram directly while working on the doc.&lt;/li&gt;
&lt;li&gt;Paste it into Mermaid Online.&lt;/li&gt;
&lt;li&gt;Use a docs or README preset.&lt;/li&gt;
&lt;li&gt;Export PNG at 2x, or SVG if the destination handles it well.&lt;/li&gt;
&lt;li&gt;Put both the Mermaid source and exported asset near the doc.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;For slides, I usually switch to a transparent preset and export at a larger scale. That keeps labels and arrows sharper on big screens, especially when the diagram gets resized by the slide tool.&lt;/p&gt;

&lt;p&gt;For blog posts, WebP is nice when I want something lighter, and the editorial-style preset gives the diagram enough breathing room that it does not look like a raw screenshot dropped into the middle of the page.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why local-first mattered
&lt;/h2&gt;

&lt;p&gt;Some Mermaid diagrams are harmless. Others describe internal systems, database relationships, release flows, or security-review details.&lt;/p&gt;

&lt;p&gt;I did not want the default workflow to require uploading diagram text just to turn it into an image.&lt;/p&gt;

&lt;p&gt;The core editor and exporter run in the browser, so the diagram content stays local during the normal export path. That makes the tool feel more appropriate for architecture notes and internal docs.&lt;/p&gt;

&lt;p&gt;It is still a small project, so I am being careful with the wording here: this is an independent tool, not affiliated with Mermaid.js, Mermaid Chart, or their maintainers.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I would like to improve next
&lt;/h2&gt;

&lt;p&gt;The current version is mostly about single-diagram export quality.&lt;/p&gt;

&lt;p&gt;The things I keep thinking about next are:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Batch export from Markdown files&lt;/li&gt;
&lt;li&gt;ZIP downloads for multiple diagrams&lt;/li&gt;
&lt;li&gt;Saved custom themes&lt;/li&gt;
&lt;li&gt;Better workflows for docs teams&lt;/li&gt;
&lt;li&gt;More examples for common architecture and product diagrams&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I am deliberately not rushing all of that in at once. The first version should do one job well: turn Mermaid code into a clean asset you can actually use.&lt;/p&gt;

&lt;h2&gt;
  
  
  Try it
&lt;/h2&gt;

&lt;p&gt;If you use Mermaid in README files, technical docs, slides, or blog posts, you can try it here:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://mermaidonline.org/?utm_source=devto&amp;amp;utm_medium=community&amp;amp;utm_campaign=launch_mermaidonline_202606&amp;amp;utm_content=showdev_docs" rel="noopener noreferrer"&gt;https://mermaidonline.org/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I would especially like feedback from people who write docs often:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Which export format do you use most?&lt;/li&gt;
&lt;li&gt;Do you prefer keeping Mermaid source in the doc, or committing generated images?&lt;/li&gt;
&lt;li&gt;What diagram style actually looks good inside your documentation system?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Small tools get better when they are shaped by real workflows, so practical feedback is more useful to me than general praise.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>showdev</category>
      <category>ai</category>
      <category>mermaid</category>
    </item>
  </channel>
</rss>
