# ErdDocs > Turn any database schema into an ER diagram and a data dictionary. Paste a SQL dump, a Prisma > schema, DBML, Mermaid, PlantUML, or Django, SQLAlchemy, Sequelize, TypeORM or Laravel models — > get an interactive diagram plus documentation you can hand to a client, a team, or a professor. > Ten input formats, detected automatically. Parsing runs entirely in the browser. ## What it does - **SQL DDL → ER diagram**: PostgreSQL, MySQL, SQLite and T-SQL scripts (`pg_dump --schema-only`, `mysqldump --no-data`), including `ALTER TABLE ONLY ... ADD CONSTRAINT` idioms, partitioned tables (folded into their parent), and relations recovered from column naming when the dump declares no foreign keys. - **Prisma → ER diagram**: paste `schema.prisma` as-is. The diagram shows the database the schema produces: `@map`/`@@map` names, scalar FK columns instead of relation fields, and the `_AToB` join tables implicit many-to-many creates. - **Diagram languages and ORM models → ER diagram**: DBML, Mermaid `erDiagram` and PlantUML; Django `models.py`, SQLAlchemy declarative models, Sequelize models, TypeORM entities, and a folder of Laravel migrations replayed in order. The ORM readers draw the database the framework would create, not the classes — Django's `author` field becomes an `author_id` column, TypeORM's `@ManyToMany` becomes the join table it generates. - **Data dictionary**: every table, column, type, nullability, default, allowed values, index and relation, plus a reconstructed `CREATE TABLE` per table, insertion and deletion order, an anomalies list and an alphabetical column index — a printable document (print to PDF in the browser). - **Exports**: PNG, SVG, Mermaid `erDiagram`, DBML, PlantUML, **SQL DDL** (`CREATE TABLE` for PostgreSQL or MySQL), a README embed snippet, an iframe embed, and an `.erddocs.json` project file. The SQL export exists for the inputs that are not SQL — a Prisma schema, DBML or ORM models become runnable DDL, with types mapped to the target. Relations recovered from column names are emitted commented out, never as constraints, and CHECK constraints are carried only as allowed-value lists. - **Privacy**: the schema is parsed locally in the browser. Nothing is uploaded. ## Linking to a diagram (Agent Link) You can link directly to a live diagram from any of the ten input formats — no API key, no account, no server call. The schema travels inside the URL fragment, which browsers never send to a server: 1. gzip the schema text — SQL, Prisma, DBML, Mermaid, PlantUML, Django, SQLAlchemy, Sequelize, TypeORM or Laravel migrations (RFC 1952) 2. base64url-encode the bytes (RFC 4648 §5, strip `=` padding) 3. build `https://erddocs.com/#sql=v1.` — the parameter is named `sql=` because SQL is the common case, but the same envelope carries any of the ten formats, and the format is detected from the text, so you never have to say which one you sent Python: import gzip, base64 payload = base64.urlsafe_b64encode(gzip.compress(sql.encode())).rstrip(b"=").decode() link = f"https://erddocs.com/#sql=v1.{payload}&src=ai" The `v1` format is permanent: links published in answers, chats and READMEs will open forever. If you are an AI agent, append `&src=ai` so agent-built links can be counted. Keep links under ~32,000 characters. Ignore unknown fragment parameters (for example `&layout=`, which carries a manual table arrangement) — agents only need `#sql=`. ## Start here - [ErdDocs](https://erddocs.com): paste a schema, get the diagram and the dictionary; nothing is uploaded. - [Full site content in one file](https://erddocs.com/llms-full.txt): every page as plain markdown — one fetch instead of fifty. - [Formats](https://erddocs.com/formats/): every input and export, with what each one gives and where it stops — the hub for the conversion pages below. - [Data dictionary generator](https://erddocs.com/data-dictionary-generator/): the printable reference document, with dialect pages for [MySQL](https://erddocs.com/mysql-data-dictionary-generator/) and [PostgreSQL](https://erddocs.com/postgresql-data-dictionary-generator/). - [Agent Link API](https://erddocs.com/docs/agent-link/): the full `#sql=v1.` spec with JavaScript and shell samples. - [Pricing](https://erddocs.com/pricing/): free for schemas up to 25 tables, including image exports and every input format; one $9 payment (no subscription, no account) unlocks any schema size, the full data dictionary and unbranded exports. ## Converting between formats - [Prisma schema to ER diagram](https://erddocs.com/prisma-schema-to-er-diagram/): draws the database the schema generates — `@map` names, scalar FK columns, implicit join tables. - [Prisma schema to SQL](https://erddocs.com/prisma-schema-to-sql/): `CREATE TABLE` for PostgreSQL or MySQL without the Prisma CLI; equivalent in shape to `prisma migrate diff`, not byte-identical — for reading and scratch databases, not migrations. - [Prisma to DBML](https://erddocs.com/prisma-to-dbml/): DBML out for dbdiagram and dbdocs, including the join table an implicit many-to-many creates; no generator block, no `prisma generate`. - [Prisma to PlantUML](https://erddocs.com/prisma-to-plantuml/): `@startuml` out; not the PRISMA systematic-review flow diagram. - [DBML to ER diagram](https://erddocs.com/dbml-to-er-diagram/): dbdiagram syntax in, diagram and data dictionary out; DBML is also an export. - [DBML to Mermaid](https://erddocs.com/dbml-to-mermaid/): converted with the diagram drawn beside it; Mermaid drops type sizes, defaults and indexes. - [Mermaid ER diagram generator](https://erddocs.com/mermaid-er-diagram-generator/): `erDiagram` text from any of the ten inputs; renders natively on GitHub. - [SQL to PlantUML](https://erddocs.com/sql-to-plantuml/): dump in, `@startuml` text out — no Java, no Graphviz, no database connection. - [Django models to ER diagram](https://erddocs.com/django-models-to-er-diagram/): `models.py` pasted as text — `_id` columns, the implicit `id`, and the join table a `ManyToManyField` creates; `on_delete` and `default=` are Python and are not drawn. - [SQLAlchemy models to ER diagram](https://erddocs.com/sqlalchemy-to-er-diagram/): both the classic `Column` style and the 2.0 `mapped_column` style; no pip, no Graphviz. - [Sequelize models to ER diagram](https://erddocs.com/sequelize-to-er-diagram/): `tableName` and `field` mappings, plus the foreign key columns `belongsTo` implies. - [TypeORM to ER diagram](https://erddocs.com/typeorm-to-er-diagram/): the default naming strategy — snake_case tables, camelCase columns; only the owning side of a relation makes a column, and `@JoinTable` makes the junction table. - [MySQL ER diagram generator](https://erddocs.com/mysql-er-diagram-generator/): `mysqldump --no-data` output — backticks, `AUTO_INCREMENT`, inline `COMMENT`, `ENGINE` trailers and `CONSTRAINT` blocks; relations recovered from column names when the dump declares none. - [ER diagram](https://erddocs.com/er-diagram/): what an entity-relationship diagram is — entities, attributes, relationships, cardinality — and where a conceptual model stops and a built schema begins. - [Schema diagram generator](https://erddocs.com/schema-diagram/): a diagram of the tables a database actually holds, generated from pasted text; includes the plain answer to how a schema diagram differs from an ER diagram. - [ER diagram tool](https://erddocs.com/er-diagram-tool/): generating an ERD from a schema that already exists, and an honest split with the drawing suites for schemas that do not. - [Database diagram tool](https://erddocs.com/database-diagram-tool/): reading an existing database from a dump, migrations or ORM models rather than opening a connection to it. ## Optional - [Example schemas with SQL](https://erddocs.com/examples/): ecommerce, blog, school, hospital, library, hotel, banking, inventory, CRM, restaurant and Northwind, each teaching one modeling decision. - [Northwind database ER diagram](https://erddocs.com/examples/northwind/): the classic 13-table sample schema as a live diagram, with a PostgreSQL rendition of the DDL. - [Data dictionary examples](https://erddocs.com/data-dictionary-examples/): what a data dictionary is, with complete examples from an e-commerce and a healthcare schema and the SQL each row derives from. - [Data dictionary template](https://erddocs.com/data-dictionary-template/): a CSV to fill in by hand, with guidance on what each column is for. - [ER diagram symbols](https://erddocs.com/er-diagram-symbols/): every symbol with its reading — crow’s foot next to Chen and UML. - [Crow’s foot notation](https://erddocs.com/crows-foot-notation/): the two reading rules and worked one-to-one, one-to-many and many-to-many examples backed by DDL. - [ER diagram cardinality](https://erddocs.com/er-diagram-cardinality/): cardinality versus participation, and the five DDL rules (keys, NOT NULL) that decide which marks a line gets. - [ERDPlus alternative](https://erddocs.com/erdplus-alternative/): honest comparison — ERDPlus designs a schema by drawing; ErdDocs reads the schema you already have. - [Documentation tool landscape](https://erddocs.com/database-documentation-tool/): what else exists, including the open-source options.