JSON to MySQL
Format and minify JSON, or convert it to YAML, CSV, XML, TypeScript, Zod, JSON Schema, GraphQL, SQL and more.
Paste your input on the left and press Translate (or Ctrl/Cmd + Enter) to get the result on the right. Free, no sign-up.
Example
{
"id": 42,
"name": "Ada Lovelace",
"email": "ada@example.com",
"active": true,
"score": 98.5,
"tags": ["math", "computing"],
"address": {
"city": "London",
"zip": "W1"
}
}CREATE TABLE generic ( id INT, name TEXT, email TEXT, active BOOLEAN, score INT, PRIMARY KEY (id) ); CREATE TABLE generic_tags ( generic_id INT, id INT, value TEXT, PRIMARY KEY (id), FOREIGN KEY (generic_id) REFERENCES generic(id) ); CREATE TABLE generic_address ( generic_id INT, id INT, city TEXT, zip TEXT, PRIMARY KEY (id), FOREIGN KEY (generic_id) REFERENCES generic(id) );
Frequently asked questions
- How do I generate types from JSON?
- Paste a sample object and choose TypeScript, Zod Schema or JSON Schema. The tool infers a type from the values it sees, so use a representative sample.
- Why does my JSON fail to convert?
- Most failures come from trailing commas, single quotes or unquoted keys. JSON requires double quotes and no trailing commas.
- Is my JSON uploaded?
- No. JSON conversions run in your browser.