A beautiful, responsive web application for creating and visualizing Mermaid diagrams with real-time preview, multiple themes, and export capabilities.
- Real-time Preview: See your diagrams update as you type with intelligent debouncing
- Multiple Themes: Choose from various diagram themes (default, dark, forest, neutral) and UI themes (light, dark, system)
- File Import: Load existing Mermaid diagrams from
.md,.mmd,.mermaid,.txt, or.jsonfiles - SVG Export: Download your diagrams as SVG files for use in presentations or documentation
- Responsive Design: Resizable panels with full mobile support
- Keyboard Shortcuts:
Ctrl/Cmd + Enter: Render diagramCtrl/Cmd + S: Download as SVG
- Dark Mode: Full dark mode support with optimized color schemes for better visibility
- No Installation Required: Runs entirely in the browser with no backend dependencies
Simply open the index.html file in your web browser:
open index.htmlFor a better development experience, serve the file using a local web server:
Using Python:
python3 -m http.server 8000
# Navigate to http://localhost:8000Using Node.js:
npx http-server -p 8000
# Navigate to http://localhost:8000Using PHP:
php -S localhost:8000
# Navigate to http://localhost:8000- Write Your Diagram: Enter Mermaid syntax in the left editor panel
- Preview in Real-time: Your diagram renders automatically in the right panel
- Customize Appearance:
- Use the UI theme selector to switch between light/dark modes
- Choose a diagram theme that suits your needs
- Load External Files: Click "Load File" to import existing diagrams
- Export Your Work: Click "Download SVG" to save your diagram
graph TD
A[Start] --> B{Is it working?}
B -->|Yes| C[Great!]
B -->|No| D[Debug]
D --> B
C --> E[End]
This viewer supports all Mermaid diagram types including:
- Flowcharts: Basic flow diagrams with various node shapes
- Sequence Diagrams: Interaction between actors over time
- Gantt Charts: Project timeline visualization
- Class Diagrams: Object-oriented design representation
- State Diagrams: State machine visualization
- Entity Relationship Diagrams: Database schema design
- User Journey Maps: User experience visualization
- Pie Charts: Statistical data representation
- Git Graphs: Git branch and commit visualization
- Quadrant Charts: Four-quadrant analysis
- Timeline Diagrams: Chronological event display
- Mind Maps: Hierarchical information organization
- Sankey Diagrams: Flow quantity visualization
The viewer automatically extracts Mermaid code blocks from Markdown files:
# My Document
Some text here...
```mermaid
graph TD
A --> BMore text...
### Direct Mermaid Files
- `.mmd` - Mermaid diagram files
- `.mermaid` - Alternative Mermaid extension
- `.txt` - Plain text files with Mermaid syntax
### JSON Configuration
Load diagrams from JSON files with structure:
```json
{
"mermaid": "graph TD\n A --> B",
"theme": "dark"
}
- ✅ Chrome/Edge (Latest)
- ✅ Firefox (Latest)
- ✅ Safari (Latest)
- ✅ Opera (Latest)
- ✅ Mobile browsers (iOS Safari, Chrome Mobile)
We welcome contributions! Please see our Contributing Guidelines for details.
This project is licensed under the MIT License - see the LICENSE file for details.
- Mermaid.js - The amazing diagramming library that powers this viewer
- All contributors who help improve this tool
Found a bug or have a feature request? Please open an issue on GitHub.
This project is actively maintained. Feel free to use it in production environments.
Made with ❤️ for the developer community