# SQL INSERT Generator from CSV, JSON, Excel or Parquet

> Generate CREATE TABLE and INSERT from CSV, JSON, Excel or Parquet for Snowflake, BigQuery, Databricks, Redshift, PostgreSQL and more, plus a dbt schema.yml.

Page: https://datautility.in/sql-generator
This is the Markdown copy of the page. The tool itself runs in the browser: your files are processed on your own device and are not uploaded.

**Quick answer:** Generate CREATE TABLE and INSERT statements from sample data.

## How to use the SQL INSERT Generator from CSV, JSON, Excel or Parquet

The SQL Generator turns a CSV, JSON, Excel or Parquet file into CREATE TABLE and INSERT statements for PostgreSQL, MySQL, SQL Server, Oracle or SQLite. It guesses a type for each column, lets you edit names, types, lengths and keys, and writes scripts you can run right away. It is useful for loading spreadsheets into a database and for building test fixtures.

1. Load sample data
2. Review the column types
3. Pick a database and copy

## What it does

- CREATE TABLE and INSERT scripts
- Postgres, MySQL, SQL Server, Oracle, SQLite
- Edit types, lengths and keys
- From CSV, JSON, Excel or Parquet

## 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,name,age
1,Ada,36
2,Alan,41
```

Output:

```
CREATE TABLE people (id INT, name VARCHAR(10), age INT);
INSERT INTO people VALUES (1, 'Ada', 36);
```

## Frequently asked questions

### Does it connect to my database?
No. It only writes the SQL for you to run yourself.

### Which databases does the SQL Generator support?
PostgreSQL, MySQL and MariaDB, SQL Server, Oracle and SQLite. It writes CREATE TABLE and INSERT statements from a CSV, JSON, Excel or Parquet file, and guesses column types from your data.

### Is my data uploaded?
No. Everything runs in your browser and nothing is stored.

## Related pages

- [CSV to Snowflake CREATE TABLE Generator](https://datautility.in/csv-to-snowflake): Generate a Snowflake CREATE TABLE and INSERT script from a CSV, JSON, Excel or Parquet file. Free, runs in your browser.
- [CSV to BigQuery Schema and CREATE TABLE Generator](https://datautility.in/csv-to-bigquery): Generate a BigQuery CREATE TABLE and INSERT script (INT64, STRING, DATETIME) from a CSV, JSON, Excel or Parquet file. Free, in your browser.
- [CSV to Databricks Delta DDL Generator](https://datautility.in/csv-to-databricks-delta): Generate a Databricks CREATE TABLE ... USING DELTA script and INSERT statements from a CSV, JSON, Excel or Parquet file. Free, runs in your browser.
- [CSV to Redshift CREATE TABLE Generator](https://datautility.in/csv-to-redshift): Generate an Amazon Redshift CREATE TABLE and INSERT script from a CSV, JSON, Excel or Parquet file. Types are chosen for you. Free, in your browser.
- [dbt schema.yml Generator from CSV, JSON or Parquet](https://datautility.in/dbt-schema-yml-generator): Generate a dbt schema.yml with columns, data types and unique / not_null tests from a CSV, JSON or Parquet file. Free, in your browser.
- [CSV to SQL Converter](https://datautility.in/csv-to-sql): Convert a CSV to SQL: generate CREATE TABLE and INSERT statements for PostgreSQL, MySQL, SQL Server, Oracle or SQLite. Free, in your browser.
- [Excel to SQL Converter](https://datautility.in/excel-to-sql): Convert an Excel file to SQL: generate CREATE TABLE and INSERT statements for PostgreSQL, MySQL, SQL Server, Oracle or SQLite. Free, in your browser.
- [JSON to SQL Converter](https://datautility.in/json-to-sql): Convert JSON to SQL: generate CREATE TABLE and INSERT statements for PostgreSQL, MySQL, SQL Server, Oracle or SQLite. Free, in your browser.

## Topic guides

- [Parquet Guides and Free Parquet Tools](https://datautility.in/guides/parquet)
- [CSV Guides and Free CSV Tools](https://datautility.in/guides/csv)
- [JSON Guides and Free JSON Tools](https://datautility.in/guides/json)

## Guides

- [SQL INSERT Generator: Turn CSV, Excel or Parquet into SQL](https://datautility.in/blog/csv-to-sql-insert-generator)
- [Sample Data and INSERT Statements for a DBMS Lab](https://datautility.in/blog/dbms-lab-sample-data-and-insert-statements)
- [CREATE TABLE for Snowflake, BigQuery, Databricks and Redshift](https://datautility.in/blog/generate-snowflake-bigquery-databricks-redshift-create-table-dbt-schema)
- [Moving a Startup From Spreadsheets to a Database: A Step-by-Step Guide](https://datautility.in/blog/move-from-spreadsheets-to-a-database-startup)

Open the tool: https://datautility.in/sql-generator
