SQL y bases de datos

Convertidor JSON a SQL online

Convierte objetos JSON en sentencias SQL INSERT y genera opcionalmente una definición CREATE TABLE básica. Nunca se ejecuta nada.

HostingerHosting rápido para tu webAlojamiento, dominio y SSL desde un mismo lugar.Ver oferta ↗HostingerLanza tu web hoyHosting fiable para proyectos nuevos y sitios en crecimiento.Ver oferta ↗

Vista previa de datos

SQL generado

Guía de JSON a SQL

¿Cómo convertir JSON a SQL?

Cada objeto JSON puede convertirse en una fila y sus claves en columnas SQL. El conversor genera texto escapado en el navegador y nunca lo ejecuta.

JSON anidado

Los objetos anidados pueden aplanarse con nombres como user.name, mientras que arrays y objetos pueden conservarse como JSON serializado.

Detección conservadora de tipos

Los números, booleanos y fechas se mapean cuando los valores son coherentes. Las cadenas con ceros iniciales se mantienen como texto.

CREATE TABLE automático

La definición generada es una estimación basada en la muestra proporcionada. Revisa tipos, longitudes y restricciones antes de usarla en producción.

Frequently asked questions

JSON to SQL FAQ

How do I convert JSON to SQL?

Paste an object or an array of objects, choose the table and engine, then select Convert to SQL.

Can I generate INSERT statements automatically?

Yes. You can generate one multi-row INSERT or one INSERT statement per record.

Can I generate CREATE TABLE?

Yes. Enable Generate CREATE TABLE to add a conservative definition before the INSERT.

What happens with nested JSON?

You can flatten nested objects or preserve objects and arrays as serialized JSON values.

Does it work with MySQL?

Yes. MySQL, PostgreSQL and SQLite use their appropriate identifier quoting and basic type mappings.

How are NULL values handled?

JSON null values and missing properties can be generated as SQL NULL or as an empty string according to your selection.

Does the tool execute SQL?

No. It only creates SQL text and never connects to or modifies a database.

Are my data stored?

No permanent storage is intentionally used. Avoid entering secrets or sensitive data into any online tool.

Can I load a JSON file?

Yes, .json files up to 10 MB can be loaded for the current session without executing their contents.