Converter ng SQL sa JSON

Kailangan mo ba ng reverse conversion?
JSON to SQL Converter

Input ng SQL

1

Output ng JSON

Ilagay ang SQL data para ma-convert sa JSON

Dito lalabas ang na-convert na data

Paano i-convert ang SQL sa JSON

  1. Hakbang 1 – I-paste ang SQL INSERT statements

    • I-paste ang INSERT INTO ... VALUES ...; statements mula sa SQL dump o export mo.
    • Sinusuportahan ang multiple INSERT statements na hiwalay ng semicolons.
    • Pwede ka ring mag-import ng .sql file mula sa computer mo.
  2. Hakbang 2 – Suriin ang conversion

    • Pinaparse ng tool ang SQL syntax, kinukuha ang column names bilang keys at values bilang data.
    • Integers, booleans (TRUE/FALSE), at NULL ay kino-convert sa JSON equivalents.
    • Bawat record ay may _table field para sa source table.
  3. Hakbang 3 – I-export ang JSON

    • Kopyahin ang formatted JSON array para sa APIs o config files.
    • I-download ang result bilang .json file.
    • Kung kailangan ang reverse, gamitin ang related tools para i-convert ang JSON pabalik sa 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

Mga Madalas Itanong

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.

Converter ng SQL sa JSON | JSONSwiss