Conversor de SQL a JSON

¿Necesitas la conversión inversa?
JSON to SQL Converter

Entrada SQL

1

Salida JSON

Ingresa datos en SQL para convertirlos a JSON

Tus datos convertidos aparecerán aquí

Cómo convertir SQL a JSON

  1. Paso 1 – Pega sentencias INSERT

    • Pega sentencias INSERT INTO tabla (columnas) VALUES (valores); de tu dump o exportación SQL.
    • La herramienta admite múltiples INSERT separados por punto y coma.
    • También puedes importar un archivo .sql desde tu ordenador.
  2. Paso 2 – Revisa la conversión

    • La herramienta analiza la sintaxis SQL, extrae nombres de columnas como claves y valores como datos.
    • Enteros, booleanos (TRUE/FALSE) y NULL se convierten a equivalentes JSON.
    • Cada registro incluye un campo _table con la tabla de origen.
  3. Paso 3 – Exporta los datos JSON

    • Copia el array JSON formateado para APIs o archivos de configuración.
    • Descarga el resultado como archivo .json.
    • Si necesitas el proceso inverso, usa las herramientas relacionadas para convertir JSON de nuevo a 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

Preguntas frecuentes

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.

Conversor de SQL a JSON | JSONSwiss