Santekno/toolsCategoriesTutorials

SQL → JSON Schema

Convert a CREATE TABLE statement into a JSON Schema draft-07 definition.

Processed in your browserUpdated · Jan 2026
Input
0 chars
Output
0 chars

How to use SQL → JSON Schema

Paste your input on the left, choose the options you want, and the output appears instantly on the right. Everything runs in your browser — none of your data is sent to a server.

  • Paste or type your input in the INPUT panel
  • The output regenerates automatically as you type
  • Use Copy to put the result in your clipboard
  • Click Sample to load a working example

What is SQL → JSON Schema?

SQL → JSON Schema parses a `CREATE TABLE` statement and emits a JSON Schema draft-07 document describing the row shape. SQL types are mapped to JSON Schema types: INT → integer, VARCHAR(n) → string with maxLength, TIMESTAMP → string with date-time format, UUID → string with uuid format, JSON → object. NOT NULL columns without DEFAULT are added to the `required` array. Useful for generating API contracts, validation schemas, and OpenAPI specs from existing database schemas. This tool is part of santekno's developer toolbox — a curated collection of utilities built for engineers who care about speed, privacy, and simplicity.

Common use cases

  • Debugging API payloads and integration issues
  • Inspecting tokens, hashes, or encoded strings during development
  • Generating fixtures and sample data for tests
  • Sharing readable output with teammates in code reviews

FAQ

Common types from MySQL, PostgreSQL, SQLite, and SQL Server: INT/BIGINT/SERIAL, VARCHAR/TEXT, BOOLEAN/BIT, DATE/TIMESTAMP/TIMESTAMPTZ, UUID, JSON/JSONB, DECIMAL/NUMERIC.