← Back to Work
ImageToMermaid

Convert architecture diagrams to code

An AI tool that transforms screenshots and images of diagrams into Mermaid code, enabling version-controlled documentation.

AI development, Web applicationDecember 2024

Overview

Technical teams often inherit diagrams in image format—screenshots from presentations, exported PNGs from diagramming tools, or photos of whiteboard sessions. These images can't be version controlled, edited, or embedded in markdown documentation.

ImageToMermaid solves this by converting any diagram image into Mermaid syntax—a text-based diagramming language that renders in GitHub, GitLab, Notion, and most modern documentation platforms.

The problem

Engineers frequently need to:

  • Document existing system architectures found only as images
  • Recreate diagrams from legacy documentation
  • Convert whiteboard sessions into persistent documentation
  • Maintain diagrams as code alongside their repositories

Manually transcribing complex diagrams is tedious and error-prone.

What we built

  • Computer Vision
  • LLM Processing
  • Mermaid.js
  • Web Application

The application uses a multi-stage pipeline:

  1. Image analysis - Detect shapes, arrows, and text regions
  2. OCR extraction - Pull text content from each element
  3. Structure inference - Determine relationships and flow direction
  4. Code generation - Produce clean, properly formatted Mermaid syntax

The output is immediately usable—paste it into any markdown file and the diagram renders automatically.

Diagram types
Flowcharts
Diagrams supported
Sequence
Processing time
<30s
Output ready
Copy/paste

Interested in working together?

Let's talk about your project.

Book a Call