CSV to ER Diagram
Upload one or more .csv or .tsv files and get an interactive ER diagram with automatically inferred column types and cross-file relationship detection. Works with files of any size — large datasets (500 MB+) are automatically sampled for fast schema inference.
How CSV analysis works
GraphMyDB reads your CSV files entirely in the browser and builds a database schema from the data:
Automatic type inference
Each column is analyzed to determine its type: INTEGER, FLOAT, BOOLEAN, DATE, or TEXT. The inference scans actual values, not just the header.
Any file size
Large files (over 2 MB) are automatically sampled — the first ~2,000 rows are read for schema inference. Your browser won't freeze on 500 MB+ datasets.
Cross-file relationships
When you upload multiple CSVs, columns like user_id are automatically matched to id in a users file, creating foreign key edges in the diagram.
Delimiter auto-detection
Comma, tab, semicolon, and pipe delimiters are detected automatically. CSV and TSV files work without configuration.
Statistics panel
See row counts, column counts, inferred types, and detected relationships for every uploaded file in a dedicated stats panel.
SQL DDL output
The inferred schema is also rendered as SQL CREATE TABLE statements in the Code tab, ready to copy and use.
Step by step
Upload CSV files
Switch to the CSV tab and drop one or more .csv or .tsv files. A loading indicator shows per-file read progress.
Analyze
Click 'Analyze' and GraphMyDB infers column types, detects relationships across files, and builds the schema.
Explore the diagram
Each CSV becomes a table node. Click a table to focus, click a column to trace its relationship edge. Export as PNG, SVG, SQL, or Excel.
Who is this for?
Data analysts
Understand how your datasets relate before loading them into a database or warehouse.
Data engineers
Validate CSV exports and check column types match your target schema before ETL.
Students
Learn about relational databases by seeing how real-world CSV datasets can be modeled as tables with relationships.
Kaggle users
Upload Kaggle competition datasets and instantly see the structure and relationships across files.