Database Schema Visualizer
Turn CREATE TABLE SQL into an ER diagram: tables, columns, primary and foreign keys and relations. MySQL, PostgreSQL, SQLite and SQL Server. Export SVG, PNG or Mermaid.
Tool
About this tool
About Database Schema Visualizer
Paste the structure of your database – the CREATE TABLE statements from phpMyAdmin, mysqldump --no-data, pg_dump --schema-only or your migration – and get a clear entity-relationship diagram. Primary keys, foreign keys (inline REFERENCES, FOREIGN KEY constraints and ALTER TABLE) and unique columns are shown, and lines connect each foreign key to the column it points to. The tool also warns about tables without a primary key and *_id columns that look like links but have no foreign key.
How it works
Example
How to use this tool
- Paste your CREATE TABLE statements or choose a .sql file.
- Check the diagram and the notes.
- Download it as SVG or PNG, or copy Mermaid code for your docs.
Frequently asked questions
Do I need to connect my database?
No. Paste the SQL text – the tool never connects to a database and nothing is uploaded.
Where do I get the CREATE TABLE statements?
phpMyAdmin → Export → Structure only; mysqldump --no-data mydb; pg_dump --schema-only mydb; or SHOW CREATE TABLE in MySQL.
Why are some relations missing?
MyISAM tables in MySQL do not keep foreign keys. The tool lists *_id columns that look like links so you can see them anyway.
Is my data uploaded?
No. Everything is processed in your browser and stays on your device.
Does the Database Schema Visualizer send my data to a server?
No. The Database Schema Visualizer runs entirely in your browser using JavaScript, so tokens, code and data you paste stay on your device. You can even use it offline once the page has loaded.