JSON to SQL Converter
Turn a JSON file into CREATE TABLE and INSERT statements for PostgreSQL, MySQL, SQL Server, Oracle or SQLite. Free, in your browser.
How to use the JSON to SQL Converter
Generate CREATE TABLE and INSERT statements from sample data.
- Load sample data
- Review the column types
- Pick a database and copy
Tips
- Works for PostgreSQL, MySQL, SQL Server, SQLite and Oracle.
- Set a primary key and edit any type the tool guessed.
- Copy and Download contain the full script.
Example
Input: [{"id":1,"name":"Ada"}]
Output: CREATE TABLE t (id INT, name TEXT);
INSERT INTO t VALUES (1, 'Ada');
Frequently asked questions
How do I convert JSON to SQL?
Upload the JSON, pick your database and copy the CREATE TABLE and INSERT statements.
What happens to nested JSON?
Nested objects become columns such as address.city.
Does it connect to my database?
No. It only writes the SQL for you to run yourself.
Guides