Processing stays in your browser

SQL schema visualizer

From SQL definitions to a readable database diagram. Inspect tables, columns, and foreign-key relationships in one workspace.

Relationship diagram

See how your data connects.

Add table definitions to build an interactive diagram with columns, keys, and relationships.

SQL is parsed locally; no database connection or query execution.Primary keyForeign key

Use text schema exports up to 2 MB. Binary database backups are not supported. Shared links are readable by anyone who has them.

How to visualize a SQL database schema

  1. Paste SQL CREATE TABLE statements or upload a text .sql file. Try the sample to see connected tables.
  2. Select Visualize schema. The diagram shows column types, primary keys, and declared foreign keys.
  3. Drag tables to arrange the diagram, zoom or fit it to the canvas, and inspect the table details below.

Example input

CREATE TABLE customers (id INT PRIMARY KEY);
CREATE TABLE orders (
  id INT PRIMARY KEY,
  customer_id INT REFERENCES customers(id)
);

Example output

2 tables: customers, orders
1 foreign-key relationship:
orders.customer_id → customers.id

Common questions

Which SQL schema definitions are supported?

The visualizer reads common CREATE TABLE syntax, including quoted and schema-qualified table names, composite keys, inline REFERENCES clauses, and foreign keys added with ALTER TABLE. It is a schema reader, not a full SQL engine; stored procedures, CREATE TABLE AS queries, and dialect-specific migrations may need a simplified schema export.

Why is a relationship missing from my diagram?

Relationships come from declared foreign keys. A column named user_id alone does not establish a relationship. Include both referenced tables and an inline REFERENCES or FOREIGN KEY constraint in your SQL.

Can I upload a SQLite database or binary backup?

No. Export the structure as text SQL first. SQLite .db files, SQL Server .bak files, and BSON are binary formats and are not supported by this text schema visualizer.

Can I visualize MongoDB collections?

Yes. Supply a JSON object mapping collection names to sample documents, arrays of sample documents, or JSON schemas. DataLens displays the supplied fields and types; it does not infer relationships between collections.

Continue with another tool