Skip to content
Kordu Tools
Developer Tools Runs in browser Updated 08 Apr 2026

SQL / CSV / JSON Converter

Convert between SQL INSERT statements, CSV, and JSON. Transform CSV to SQL INSERTs, SQL to JSON, or JSON to SQL INSERTs with dialect options.

Loading rating…

How to use SQL / CSV / JSON Converter

  1. Choose a conversion mode

    Select CSV to SQL INSERT, SQL to JSON, or JSON to SQL depending on the direction you need.

  2. Configure options

    For SQL output, choose your database dialect (MySQL, PostgreSQL, SQLite, or generic), batch size, and how to handle empty/null values.

  3. Paste your data and convert

    Paste your input data into the left panel and click Convert. The output appears on the right.

  4. Copy or download the result

    Use the Copy button to copy to clipboard, or Download to save as a .json or .sql file.

SQL / CSV / JSON Converter FAQ

What SQL dialects are supported?

MySQL (backtick identifier quoting), PostgreSQL (double-quote quoting), SQLite (double-quote quoting), and Generic SQL (no quoting). The dialect affects identifier quoting and boolean values — MySQL uses 1/0 for booleans, PostgreSQL uses TRUE/FALSE.

What does batch size mean?

Batch size controls how many rows are included in each INSERT statement. A batch size of 1 produces one INSERT per row — the most compatible option. Larger batches (50, 100, all) produce multi-row INSERTs like INSERT INTO users (...) VALUES (...), (...) which are faster to execute and easier to read.

How does NULL handling work?

When NULL handling is set to NULL, empty cells in CSV or null values in JSON are converted to SQL NULL. When set to Empty string, they become '' (an empty string in the database). Which to use depends on your schema — NOT NULL columns typically need '' while nullable columns should use NULL.

What SQL INSERT format does the SQL to JSON converter accept?

The tool parses standard INSERT INTO table (col1, col2) VALUES (val1, val2), (val3, val4) syntax. It handles multi-row inserts, string values with escaped single quotes, NULL values, and identifiers quoted with backticks, double quotes, or square brackets.

Does the CSV need a header row?

Yes. The first row is treated as the column names and becomes the field names in the JSON output or the column names in the SQL INSERT statement.

Can I convert large files?

Yes, but large conversions may take a moment. All processing happens in your browser using PapaParse for CSV parsing. There is no file size limit imposed by the tool, but very large inputs may be slow depending on your device.

Is any data sent to a server?

No. All conversion logic runs in your browser. Your data is never uploaded or transmitted anywhere.

What happens with special characters in string values?

Single quotes in string values are escaped as '' (two single quotes) in SQL output, which is the standard SQL escaping method. Other special characters are passed through as-is within the single-quoted string.

Background

SQL / CSV / JSON Converter transforms data between three common formats: SQL INSERT statements, CSV spreadsheet data, and JSON arrays.

CSV to SQL INSERT — paste CSV data (with a header row) and get ready-to-run SQL INSERT statements. Choose your database dialect (MySQL, PostgreSQL, SQLite, or generic SQL) and the converter uses the correct identifier quoting. Control batch size to produce one INSERT per row for maximum compatibility, or multi-row INSERTs for performance. Configure how empty cells are handled — as NULL or as empty strings.

SQL to JSON — paste SQL INSERT statements and get a clean JSON array of objects, one per row. Useful for seeding test fixtures, exporting data for APIs, or migrating from a SQL dump to a JSON format.

JSON to SQL — paste a JSON array of objects and get SQL INSERT statements in your chosen dialect. Handy for importing data from APIs or NoSQL databases into a relational database.

All conversion runs entirely in your browser. No files are uploaded. No data is sent to any server.