Create Diagrams with Code or Visual Mode
A powerful tool for creating professional diagrams using Mermaid syntax. Build flowcharts, sequence diagrams, class diagrams, state diagrams, and more with real-time preview and export options.
The Mermaid Diagram Generator is a powerful tool for creating professional diagrams using the Mermaid declarative syntax. Whether you need to document system architectures, visualize workflows, or create technical documentation, this tool provides an intuitive interface for building complex diagrams.
Tip: You can switch between visual template selection and direct code editing. The live preview updates instantly as you type.
The tool supports eight different types of diagrams, each with its own Mermaid syntax and use cases. Templates are provided for each type to help you get started quickly.
Create process flows, decision trees, and workflows. Perfect for visualizing algorithms, business processes, and step-by-step procedures.
Visualize interactions between systems and components over time. Ideal for documenting API calls, system communications, and user flows.
Design object-oriented architectures and class relationships. Great for software design, system architecture, and documentation.
Model state machines and application workflows. Useful for understanding state transitions in applications and systems.
Design entity-relationship models for databases. Essential for database design and data modeling projects.
Create project timelines and schedules. Perfect for project management, milestone tracking, and task planning.
Visualize data as proportional segments. Great for showing distributions, statistics, and data breakdowns.
Visualize version control flows and branching strategies. Useful for documenting git workflows and repository history.
The editor provides a split-screen interface with the Mermaid code editor on the left and a live preview on the right. This allows you to see your diagram updates in real-time as you write code.
Write and edit Mermaid syntax with a responsive code editor. Supports undo/redo and auto-save functionality.
View your rendered diagram instantly. Zoom in/out and toggle fullscreen for better visualization.
Access templates, saved diagrams, and diagram type selection from the collapsible sidebar.
The templates library provides starting points for each diagram type. Each template includes a basic structure that you can customize for your needs.
Note: Templates are pre-configured examples. Clicking a template will replace your current code. Make sure to save your work before loading a new template.
Your diagrams are automatically saved to your browser's local storage, ensuring you don't lose your work. You can also manually save diagrams with custom names for easy organization.
Click the save button in the toolbar to save your diagram. You'll be prompted to enter a name for your diagram.
Enable auto-save in settings to automatically save changes as you type. Never lose your work again.
The toolbar provides quick access to all essential actions for managing and exporting your diagrams.
Save your current diagram to local storage with a custom name.
Revert or reapply changes in your code editor. Supports full history navigation.
Zoom in and out of the diagram preview for better visibility of complex diagrams.
Toggle fullscreen mode for an immersive view of your diagram.
Export your diagram as PNG or SVG for use in documents, presentations, or websites.
Customize editor theme, font size, and auto-save preferences.
Export your diagrams in multiple formats for use in various contexts. Both PNG and SVG exports maintain high quality and are ready for professional use.
Export as a high-resolution PNG image. Perfect for presentations, documents, and web use. Includes proper scaling for clear visibility.
Export as scalable vector graphics. Ideal for technical documentation, printing, and cases where scalability is important. Can be edited in vector graphics software.
Tip: SVG exports are recommended for documentation and print materials as they remain crisp at any size. Use PNG for web images and social media.
Customize your editor experience through the settings panel. Adjust appearance and behavior to match your preferences.
Enable automatic saving of changes as you type. Your work is protected from browser crashes and accidental closures.
Switch between dark and light themes for the editor interface. The diagram preview adapts to maintain visibility.
Adjust the editor font size for better readability. Choose from small, medium, or large options based on your preference.
The Mermaid renderer uses a dark theme by default with blue accents. Diagram colors can be customized through Mermaid configuration options in your code.
Understanding Mermaid syntax is key to creating effective diagrams. Below are basic syntax patterns for each diagram type.
graph TD
A[Start] --> B{Decision}
B -->|Yes| C[Action 1]
B -->|No| D[Action 2]
C --> E[End]
D --> EsequenceDiagram
participant A as Alice
participant B as Bob
A->>B: Message
B-->>A: ResponseclassDiagram
class Animal {
+String name
+int age
+makeSound()
}
class Dog {
+String breed
+bark()
}
Animal <|-- DogLearn More: For complete syntax documentation, visit the official Mermaid.js documentation.
Speed up your workflow with these keyboard shortcuts available in the editor.