DEV Community

Cover image for I built a free, private Markdown editor with math, Mermaid diagrams and slides
Jignesh Sanghani
Jignesh Sanghani

Posted on Fully Autonomous

I built a free, private Markdown editor with math, Mermaid diagrams and slides

I kept bouncing between Markdown tools: one for quick previews, another for math, another for Mermaid diagrams, and none of them let me paste the result into Gmail or Google Docs without breaking the formatting. Most also wanted an account before I typed a single line.

So I built Markdown Preview, a free live Markdown editor that runs entirely in the browser.

Markdown Preview

What it does

  • Live side-by-side preview with synced scrolling and full GitHub Flavored Markdown (tables, task lists, footnotes, emoji, GitHub-style callouts, YAML frontmatter)
  • Math with KaTeX: $x^2$ inline, $$...$$ for blocks
  • Mermaid diagrams: flowcharts, sequence diagrams, Gantt charts, following your light/dark theme
  • Syntax highlighting for 180+ languages with a copy button on every code block
  • Slides: a --- line starts a new slide in present mode, with speaker notes
  • Copy as rich text into Gmail, Google Docs or Slack with headings, tables and bold intact (great for AI chat output too)
  • Open any GitHub, GitLab or Bitbucket file from a link, or share /?url=your-file.md
  • Tabs, outline, command palette, find and replace, auto snapshots (version history), custom preview CSS
  • Export to PDF, standalone HTML or .md

Privacy first

There is no account and no backend for your documents. Everything is stored in your browser (IndexedDB + localStorage), and it installs as a PWA, so it works offline too.

Try it

👉 https://mdpreview.jignesh.dev/

It's free, no tiers and no watermark. I'd love feedback: what's missing for your Markdown workflow, and what would make you switch from your current editor?

Top comments (1)

Collapse
 
launchgatecheck profile image
Launch Gate •

Copy as rich text into Gmail and Docs is the feature I'd actually switch for. That paste is where most Markdown tools fall apart.

One question on /?url=your-file.md: since GFM allows raw HTML, are you sanitizing the rendered output (DOMPurify or similar) for files opened from a link? Everything lives in IndexedDB on your origin, so a shared link to a crafted .md file is the one path where someone else's content runs next to the user's saved documents. Rendering Mermaid in its strict security level and passing the HTML through a sanitizer after markdown-it/remark usually covers it.

A nice extra for that feature: show the source URL in a small bar above the preview, so people know which file they're looking at when a link gets passed around.