SQL zu JSON Konverter

Benötigst du die umgekehrte Konvertierung?
JSON to SQL Converter

SQL Eingabe

1

JSON Ausgabe

Geben Sie SQL-Daten ein, um sie in JSON umzuwandeln

Ihre konvertierten Daten erscheinen hier

So konvertieren Sie SQL in JSON

  1. Schritt 1 – SQL-INSERT-Statements einfügen

    • Fügen Sie INSERT INTO table_name (columns) VALUES (values); aus Ihrem SQL-Dump oder Export ein.
    • Das Tool unterstützt mehrere INSERT-Statements, getrennt durch Semikolons.
    • Sie können auch eine .sql-Datei von Ihrem Computer importieren.
  2. Schritt 2 – Konvertierung prüfen

    • Das Tool parst SQL, extrahiert Spaltennamen als Keys und Werte als Daten.
    • Integer, Booleans (TRUE/FALSE) und NULL werden in JSON-Äquivalente umgewandelt.
    • Jeder Datensatz enthält ein _table-Feld mit dem Namen der Quelltabelle.
  3. Schritt 3 – JSON exportieren

    • Kopieren Sie das formatierte JSON-Array für APIs oder Konfigurationsdateien.
    • Laden Sie das Ergebnis als .json-Datei herunter.
    • Für die Rückrichtung nutzen Sie die verwandten Tools, um JSON wieder in SQL zu konvertieren.
Example: SQL to JSON
// Input SQL
INSERT INTO users (id, role) VALUES (1, 'admin');

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

Related tools

Häufig gestellte Fragen

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.

SQL zu JSON Konverter | JSONSwiss