convert

CSV/TSV to JSON

Convert delimited data to JSON records.

Runs on your deviceBatch ready

Add data files

EPUB, CSV, TSV, JSON and other portable formats.

Drop data files here
Drag and drop, or choose files
CSVTSV

Choose an output

Convert delimited data to JSON records.

About CSV/TSV to JSON

This tool reads a CSV or TSV file, uses the first row as field names and turns every row after it into a JSON object. The result is a pretty-printed array of records, the shape most APIs, JavaScript code and NoSQL imports expect. CSV delimiters are detected automatically, and .tsv files are read as tab-separated.

When it helps

  • Turning a spreadsheet export into seed data or test fixtures for a web app.
  • Preparing a product or contact list for a REST API that takes JSON records.
  • Loading tabular data into MongoDB, Firebase or another JSON document store.
  • Feeding a CSV to a charting library or script that works with arrays of objects.

Tips

  • The header row is required. Give each column a short, unique name, since those names become the JSON keys.
  • Every value comes out as a string, so "42" stays "42" and "true" stays "true". Cast types in your own code if you need numbers or booleans.
  • Rows with more or fewer fields than the header cause an error. Fix stray commas or unquoted text first; fields that contain commas need double quotes around them.
  • Save the file as UTF-8 so accented characters and symbols come through correctly.

Good to know

Quick answers about csv/tsv to json in your browser.

No. Each CSV row maps to one flat object with one key per column. CSV has no way to express nesting, so any grouping has to be done after conversion.

At least one row has a different number of values than the header row. This is usually an unquoted comma inside a value, a missing trailing column or a line break inside a field that isn't wrapped in quotes.

Yes. There is no sign-up, no watermark and no limit on how many files you process.

No. Files are read and processed locally in your browser, so they never leave your device.

Related tools