Database & SQL

SQL Table Generator

Paste sample structured data and get a starter CREATE TABLE statement. Column types, nullability and lengths are inferred from your values — entirely in your browser.

Runs in your browser v1.0.0

Options

live

Sample data

A JSON array of objects, or CSV/TSV with a header row. Nothing is uploaded.

Generated SQL


            

Inferred columns

no data

Column types appear here as soon as you paste sample data.

How it works

Each column is scanned independently. Integers, decimals, booleans, dates, timestamps and UUIDs are detected from the values; anything else becomes text sized to the longest value. A column becomes NOT NULL only when no row contains a missing value, and mixed columns fall back to the widest compatible type. Review the result before running it — a sample is not a schema.