Loadingโฆ
Loadingโฆ
Turn a JSON array into a CREATE TABLE with inferred column types and batched INSERT statements for PostgreSQL, MySQL, SQL Server, or SQLite.
Also covers: JSON to INSERT statements ยท JSON to CREATE TABLE ยท JSON to SQL Server ยท JSON to PostgreSQL
SQL statements appear here as you type. Paste JSON, or click Sample.
Each object becomes a row and each key a column. A single object becomes one row.
PostgreSQL, MySQL/MariaDB, SQL Server, or SQLite: identifier quoting, column types, booleans, and string literals follow each one.
Copy or download the CREATE TABLE and batched INSERT statements and run them in your database.
From every value in the column: whole numbers become INTEGER (or BIGINT when large), decimals NUMERIC/DECIMAL, true/false BOOLEAN or BIT, ISO dates DATE or TIMESTAMP, and everything else text. Mixed columns take the widest type.
They're stored as JSON text in a JSONB (PostgreSQL), JSON (MySQL), NVARCHAR(MAX) (SQL Server), or TEXT (SQLite) column.
Columns that have a value in every object. A column called id holding unique whole numbers becomes the PRIMARY KEY.
No. Everything is generated in your browser, and nothing you paste is sent to a server.
Data
Format, validate, and minify JSON in your browser. Paste it, upload a file, or load it from a URL. Errors show the exact line and column.
C# / .NET
Paste JSON and get C# model classes or records, ready for System.Text.Json or Newtonsoft.Json. Nested objects, arrays, nullable types, dates, and GUIDs are inferred for you.
TypeScript
Paste JSON and get TypeScript interfaces or type aliases, with nested objects named for you, optional and nullable fields detected from every array item, and union types.
SQL
Format and beautify SQL queries for SQL Server (T-SQL), PostgreSQL, MySQL, Oracle, and more. Set the indentation, keyword case, and layout, and get the exact line of any syntax error.
Data
Format, validate, and minify XML (config files, .csproj, SOAP, RSS) in your browser. Entities, CDATA, and mixed content are kept exactly as written, and errors show the line and column.
Data
Format and validate YAML (docker-compose, Kubernetes, GitHub Actions) without losing comments, or convert YAML to JSON. Errors show the exact line and column.