Nirmion
Help Find a tool

LOCAL DATABASE CONVERTER / JSON TO SQL INSERT

JSON to SQL INSERT

Generate escaped batched SQL INSERT statements from a flat JSON record array without connecting to a database.

Processed in this browserOne UTF-8 .json file up to 5 MB. The root must be a non-empty flat scalar object array within 50,000 records, 200 columns, 1,000,000 cells, and 20 MB output.

Step 1 / source

Choose the source

JSON - typed SQL literals

Drop one file here

Choose the flat json record array you want to turn into escaped sql insert script.

Checking publication status...

01
No file upload

This operation runs with browser APIs. Nirmion receives catalogue requests, not the selected source bytes.

02
Original stays unchanged

The converter creates a separately named output. It never writes back into the source file.

03
Bounded work

One UTF-8 .json file up to 5 MB. The root must be a non-empty flat scalar object array within 50,000 records, 200 columns, 1,000,000 cells, and 20 MB output.

Plain-language method

How JSON to SQL INSERT works

The converter validates flat records, builds union columns in first-seen order, quotes identifiers, writes JSON null as SQL NULL, preserves finite numbers and booleans as dialect-appropriate literals, escapes string values, and batches INSERT statements without executing them.

  1. 01
    Choose a valid source

    Every array item must be an object containing strings, finite numbers, booleans, or null. Nested data is rejected.

  2. 02
    Review the conversion choices

    Dialect controls identifier quoting and boolean syntax. Batch size affects script shape, not record order.

  3. 03
    Inspect the separate result

    The result ends in _nirmion_tools.sql. Review destination types and constraints before running it in a test transaction.

Useful when

Practical jobs this tool handles

  • Create deterministic database seed scripts.
  • Review an API-data import with a DBA.
  • Move approved flat fixtures into SQL.

Before converting

Check the source and destination rules

  • Confirm JSON types match destination columns.
  • Verify table and union-column names.
  • Test rollback and conflict behavior.

Know the boundary

Know what the destination format cannot keep

The script contains INSERT statements only. It does not create tables, start transactions, handle conflicts, validate foreign keys, or inspect the destination database.

Quick answers

Questions before you convert

The conversion contract is deliberately explicit.

Are JSON numbers preserved?

Finite numbers are emitted as numeric literals.

How are booleans written?

ANSI and PostgreSQL use TRUE or FALSE; MySQL and SQLite use 1 or 0.

Can nested JSON be stored as JSON columns?

Not in this route. Nested values are rejected so the mapping stays explicit.