# Import a schema and export SQL
Turn an existing schema into a diagram, and get SQL out for your database.
Open an ERD.
Click Import in the bottom dock, or open the Tables panel ⋯ and click Import.
In Import your schema, pick the format: Schema JSON, SQL, CSV or XLSX. Files can be .json, .sql, .dbml, .txt, .csv, .xlsx or .xls.
Check the live preview.
Import. The tables appear on the board.
You can also start a new ERD from a file: Artifacts > ERD > Import. On the Free plan this shows an upgrade prompt.
Open the Tables panel ⋯ menu.
Point to Export SQL.
Pick PostgreSQL, MySQL, MariaDB, SQLite or SQL Server.
Copy the SQL, download a .sql file, or save it to Google Drive or OneDrive.
Delete all tables in the Tables panel ⋯ menu clears the diagram.