CSV to JSON, XML and SQL Converter

Paste CSV or upload a .csv file, then turn it into JSON, XML or SQL with one click.

Editor (CSV Input)
1
Ready — paste or upload CSV here
Viewer
Converted output will appear here
Ready

How to convert CSV

  1. Paste your CSV into the editor or click Upload CSV to open a file.
  2. Make sure the first line holds the column names.
  3. Click Convert to JSON, Convert to XML or Convert to SQL.
  4. Copy or download the result from the right panel.

How your CSV is read

Example

name,city,age
"Smith, John",Boston,42
Ann,,7

converts to

[
  {
    "name": "Smith, John",
    "city": "Boston",
    "age": "42"
  },
  {
    "name": "Ann",
    "city": "",
    "age": "7"
  }
]

Generating SQL from CSV

Convert to SQL opens a small dialog where you enter the table name and choose PostgreSQL, MySQL, SQL Server or SQLite. You get a CREATE TABLE statement followed by an INSERT with one row per CSV line. Quotes inside values are escaped for you, so O'Brien becomes 'O''Brien', and table and column names are quoted the way the chosen database expects. All columns are created as VARCHAR(255), so adjust the types before you run the script against a real database.

Frequently asked questions

My file uses semicolons instead of commas. What can I do?

Spreadsheet programs in countries that use a comma as the decimal mark often save CSV with semicolons. Save the file again and choose comma as the separator, or replace the semicolons before converting.

How do I turn JSON back into CSV?

Open the JSON/XML formatter, paste your JSON, click Convert to CSV and then Export CSV to download the file. Nested objects are flattened into columns with dotted names such as address.city.

Why are my numbers in quotes in the JSON output?

CSV has no data types, so every value is read as text. If you need real numbers, change them in the JSON afterwards or cast them in your code.

Other tools

Share Content

Choose what to share and generate an instant link

🔥 One-time link Content deleted from server after first view
✉️
Uploading to server…