Convertitore SQL in JSON

Ti serve la conversione inversa?
JSON to SQL Converter

Input SQL

1

Output JSON

Inserisci dati in SQL per convertirli in JSON

I dati convertiti appariranno qui

Come convertire SQL in JSON

  1. Passo 1 – Incolla INSERT SQL

    • Incolla istruzioni INSERT INTO tabella (colonne) VALUES (valori); dal dump o export SQL.
    • Lo strumento supporta più INSERT separati da punto e virgola.
    • Puoi anche importare un file .sql dal tuo computer.
  2. Passo 2 – Controlla la conversione

    • Lo strumento analizza la sintassi SQL, estrae i nomi delle colonne come chiavi e i valori come dati.
    • Interi, booleani (TRUE/FALSE) e NULL vengono convertiti in equivalenti JSON.
    • Ogni record include un campo _table che indica la tabella di origine.
  3. Passo 3 – Esporta i dati JSON

    • Copia l’array JSON formattato per API o file di configurazione.
    • Scarica il risultato come file .json.
    • Se ti serve l’inverso, usa gli strumenti correlati per convertire JSON in SQL.
Example: SQL to JSON
// Input SQL
INSERT INTO users (id, role) VALUES (1, 'admin');

// Output JSON
[
  {
    "id": 1,
    "role": "admin",
    "_table": "users"
  }
]

Related tools

Domande frequenti

What SQL statements are supported?

Currently supports INSERT INTO statements with a VALUES clause. Each INSERT statement becomes a JSON object with column names as keys and the table name stored in a _table field.

How are SQL data types converted?

NULL → null, quoted strings → strings, numbers → numbers, TRUE/FALSE → booleans. Complex values are treated as strings and may need additional parsing.

Can I process multiple INSERT statements?

Yes. The converter processes all INSERT statements in the input and creates an array of JSON objects, one for each INSERT statement.

What about other SQL statements?

Currently only INSERT statements are supported. CREATE TABLE, SELECT, UPDATE, and DELETE statements are not processed but won't cause errors.

Is my data secure?

Yes, all data processing happens entirely in your browser. Your data is never sent to any server, ensuring complete privacy and security.

Convertitore SQL in JSON | JSONSwiss