ToolsForcebeta

$ run --tool

JSON to SQL Table

Convert JSON into a CREATE TABLE SQL statement with inferred column types.

SQL

CREATE TABLE users (
  id INT PRIMARY KEY AUTO_INCREMENT,
  name VARCHAR(255),
  email VARCHAR(255),
  price DECIMAL(10,2),
  isActive BOOLEAN,
  createdAt DATETIME
);

Features

  • Infers INT, DECIMAL, VARCHAR, DATETIME and BOOLEAN types
  • Nested objects/arrays map to JSON columns
  • Adds an auto-increment primary key

How to use

  1. 1Paste your JSON
  2. 2Set a table name
  3. 3Copy the generated CREATE TABLE statement

Frequently asked questions

What happens to nested objects?+

They're stored as a JSON column, since SQL tables are flat.

Related tools

Need a tool that isn't here yet?

ToolsForce is growing every week. Tell us what to build next.

Request a tool