CSV to JSON / Excel / SQL

Convert a CSV file to JSON, NDJSON, an Excel workbook or SQL INSERT statements, with delimiter and type detection and a preview.

Runs in your browser. Nothing is uploaded.

Updated

CSVRuns in your browser · up to 100 MB
Your text stays on this device. No upload required.

How to use CSV to JSON / Excel / SQL

  1. Paste the CSV or open the file (up to 100 MB).
  2. Choose JSON, NDJSON, Excel or SQL and the options.
  3. Convert, check the preview, then download or copy.

CSV to JSON / Excel / SQL at a glance

Typical use: Turn a shop’s order export into JSON for a script, or into INSERTs for a MySQL table.

Runs in your browser; the file isn’t uploaded. Large files are converted in the background with progress.

When to use CSV to JSON / Excel / SQL

Turn a CSV export (from a spreadsheet, a database, a bank or an online shop) into JSON for an API or a script, NDJSON for log and data tools, an Excel file to share, or SQL INSERT statements to load into MySQL, PostgreSQL or SQLite.

Paste the CSV or open the file. The page finds the delimiter, reads quoted values with commas and line breaks correctly, detects numbers and true/false, shows a preview and points out uneven rows. Files up to 100 MB are converted in the background, in your browser.

How values are converted

  • A column becomes numbers only if every filled cell is a plain number, so ZIP codes like 01234, phone numbers like +92… and amounts like 1,000 stay text. Numbers keep the exact digits you had (1.10 stays 1.10).
  • Numbers with more than 15 digits, such as long order or card numbers, stay text, because JSON readers and Excel would round them.
  • true and false (any case) become booleans. Empty cells become null unless you turn that off.
  • Duplicate or blank column names get a number or a name, so every key is unique.

CSV to JSON / Excel / SQL example

This CSV:

id,name,price,in_stock
1,"Smith, Anna",12.50,true
2,Bilal Khan,,false

becomes this JSON:

[
  { "id": 1, "name": "Smith, Anna", "price": 12.50, "in_stock": true },
  { "id": 2, "name": "Bilal Khan", "price": null, "in_stock": false }
]

SQL output

Choose the database so names and text are quoted the way it expects: backticks for MySQL, double quotes for PostgreSQL and SQLite, and quotes and backslashes in values escaped. The optional CREATE TABLE uses the detected types (BIGINT, DOUBLE, BOOLEAN, TEXT). Rows are grouped into INSERT statements of 500 by default, which loads much faster than one row at a time.

Prefer the terminal?

The same conversion in Python with pandas:

python3 -c "import pandas as pd; pd.read_csv('in.csv').to_json('out.json', orient='records', indent=2)"

pandas guesses types for you and turns long ID numbers into floats; add dtype=str to keep every value as text. For SQL, csvkit’s csvsql writes CREATE TABLE and INSERT statements.

References

Frequently asked questions

My CSV uses semicolons. Will it work?

Yes. Excel in many European countries saves CSV with semicolons; the page detects comma, semicolon, tab and pipe automatically, or you can choose one.

Why are some numbers kept as text?

Values with leading zeros, plus signs, thousands separators or more than 15 digits would change if converted (01234 would become 1234). Turn off “Detect numbers and true/false” to keep every value as text.

Is there a size limit?

Files up to 100 MB. Excel files can hold up to 1,048,576 rows; for more, use JSON, NDJSON or SQL. Very large files need a computer with enough memory.

Does the Excel file keep formulas?

No: every cell is a value. Text that starts with = is stored as text, not run as a formula, which also protects you from formulas hidden in downloaded CSV files.

Is my file uploaded?

No. The file is read and converted in your browser; nothing is sent to our server. “Open in jq Playground” passes the JSON to that page within this browser tab.