Skip to main content
CuteJSON
↑↓ Navigate Enter Select Esc Close

JSON to SQL Converter

Turn a JSON document into a CREATE TABLE statement and the INSERT statements to load it, for the dialect you actually run.

Back to all tools

Keyboard shortcuts

These work wherever the matching action exists on this page.

Open the command palette
Ctrl/Cmd + K
Run the main action
Ctrl/Cmd + Enter
Format
Ctrl/Cmd + Shift + F
Minify
Ctrl/Cmd + Shift + M
Copy output
Ctrl/Cmd + Shift + C
Open file
Ctrl/Cmd + Shift + O
Download output
Ctrl/Cmd + S
Close this dialog
Esc
Open this dialog
F1 / ?

Local data

Everything below is stored only in this browser, on this device. None of it is ever sent anywhere, and closing this dialog is not required for that to stay true.

Unsaved drafts
Tools with remembered options

Recently opened files

    No files opened yet on this device.

    Share via link

    The content is packed into the part of the link after the # sign, which browsers never send to a server. Nothing here is uploaded to cutejson.com or anywhere else.

    Shares the first input on this page. On a tool with more than one, only that one is included.

    Nothing to share yet. Paste or type something first.

    Input

    Load from a URL

    Fetches the URL directly from your browser and loads whatever text it returns into this pane.

    Output

    The result appears here.

    Runs entirely in your browser. Nothing you paste is uploaded, and you can confirm that in your browser Network tab.

    About this tool

    Four SQL dialects, because CREATE TABLE and identifier quoting genuinely differ enough between them that picking one would be wrong for the other three. The document has to be an array of objects, or a single object as a one row table, the same shape the CSV converter accepts. Every column type is inferred by looking at every occurrence of that column across every record, not just the first one: a column falls back to a plain text column the moment two records disagree on its kind, a column that is always null gives nothing to infer from, and a nested object or array becomes either the dialect native JSON column type or a plain text column, your choice, since SQLite and SQL Server have no native JSON column type of their own either way. A column of pure integers gets its digit count checked against a safe range for a normal integer column; past that it gets a big or arbitrary precision decimal type instead, because a twenty digit id silently declared as a normal integer would silently overflow the moment the statement actually ran. Every identifier is quoted in the target dialect own style and every string is escaped for that dialect too, so the output is meant to run as written rather than be corrected by hand first. This produces SQL, not JSON, and no dialect reads SQL back into JSON, so this is one direction only, the same as the TypeScript and schema generators on this site.

    How to use

    1. Paste your JSON on the left, or load the sample.
    2. Choose a dialect, a table name, and any options, then press Convert.
    3. Copy the result or download it as a file.