Home › SQLAlchemy
SQLAlchemy to ER Diagram
Paste your SQLAlchemy declarative models and get an interactive ER diagram — tables from __tablename__, columns, and relations from ForeignKey.
No signup · nothing uploaded · export PNG / SVG / Mermaid / DBML · shareable link
How it works
- Copy your SQLAlchemy model classes (declarative
Base/db.Model). - Paste them into the editor — SQLAlchemy is auto-detected.
- Each model becomes a table;
ForeignKey("table.col")becomes a relation. - Arrange, hide tables, then export PNG/SVG or share a link.
Example
SQLAlchemy models like this:
class User(Base):
__tablename__ = "users"
id = Column(Integer, primary_key=True)
email = Column(String, unique=True)
class Post(Base):
__tablename__ = "posts"
id = Column(Integer, primary_key=True)
author_id = Column(Integer, ForeignKey("users.id"))
…renders two tables with a relation from posts.author_id → users.id. Try it with your own →
Why use it
- Private: everything runs in your browser — nothing is uploaded or stored on a server.
- Interactive: drag tables, auto-arrange, hide noise, add notes, and manually link columns.
- Export a high-res PNG, vector SVG, or the schema as Mermaid / DBML / PlantUML code.
- Free & open source — no account, no sign-up.
SQLAlchemyPrismaSequelizeSQL
FAQ
How do I visualize SQLAlchemy models?
Paste your declarative model classes. Tables come from __tablename__, columns from Column(...), and relations from ForeignKey.
Do I need to run my app?
No — it reads the model source directly in the browser, nothing is imported or executed.
Is my schema uploaded anywhere?
No. Everything runs locally in your browser — your schema is never uploaded to or stored on any server.
Is it free?
Yes. It is completely free and open source, with no account or sign-up required.