Sequelize to ER Diagram
Paste your Sequelize model definitions and get an interactive ER diagram — tables, columns from DataTypes, and relations from associations.
How it works
- Copy your Sequelize models (
sequelize.define(...)orModel.init(...)). - Paste them into the editor — Sequelize is auto-detected.
- Each model becomes a table; associations like
belongsTobecome relations. - Arrange, hide tables, then export PNG/SVG or share a link.
Example
Sequelize models like this:
const User = sequelize.define('User', {
email: { type: DataTypes.STRING, unique: true }
});
const Post = sequelize.define('Post', {
title: DataTypes.STRING
});
Post.belongsTo(User);
…renders User and Post with a relation between them. Try it with your own →
Guide
Sequelize models can be defined three ways — sequelize.define('User', {...}), class User extends Model {} + User.init({...}), or the old sequelize.import — and this page reads all of them as plain text. Attribute names come from the object keys, types from the DataTypes values, and primaryKey: true, unique: true, allowNull: false are picked up as key/constraint badges.
Relations are drawn from your associations: Post.belongsTo(User) and User.hasMany(Post) both produce the same edge (the foreign key is what matters), belongsToMany through a model renders as many-to-many via the join table, and alias options like { as: 'author', foreignKey: 'author_id' } are respected when naming the edge.
An alternative that captures the real database: call await sequelize.sync({ logging: console.log }) once against a scratch database and paste the logged CREATE TABLE SQL instead. That shows exactly what Sequelize would build, including the join tables it creates implicitly for belongsToMany.
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.
FAQ
How do I diagram Sequelize models?
Paste your sequelize.define or Model.init definitions. Columns come from DataTypes and relations from associations like belongsTo / hasMany.
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.