CSV to JSON Converter

Parse CSV (quoted fields, embedded commas and line breaks included) into a JSON array, using the header row as keys and optional type inference.

Runs on your device

Result

Results appear here after you select “Convert”.

What it does

Turn a spreadsheet export into JSON for seeding a database or mocking an API. The parser follows RFC 4180, so quoted fields containing commas, quotes or new lines are read correctly.

How to use it

  1. Paste CSV text.
  2. Set the delimiter and whether the first row is a header.
  3. Convert and copy or download the JSON.

Example

The example fills in realistic values and runs the tool. Select Try an example above to see it.

When it helps

  • Creating fixtures from spreadsheets.
  • Importing contact lists into scripts.
  • Converting reports for JavaScript charts.

Questions

What does type inference do?

Plain numbers become JSON numbers and true, false and null become their JSON values. Leave it off to keep everything as strings, which is safer for IDs and phone numbers with leading zeros.

Are empty header cells allowed?

Yes. They are named column1, column2 and so on.

More developer tools

See all 25

People also use

Browse all 200 tools