Skip to content
LineOtter

CSV to JSON converter

Turn a spreadsheet export into JSON for an API, a config file or a script. Values are kept exactly as text, so 02134 stays 02134 and long ID numbers are not rounded.

Runs in your browser. Nothing is uploaded.

Loading tool…

How to use

  1. Paste CSV with a header row.
  2. Choose the delimiter.
  3. Copy or download the JSON.

Common uses

  • Turn a spreadsheet export into data for an API request or a script.
  • Create a JSON fixture for tests from a table maintained in Excel or Google Sheets.
  • Convert a product or contact list while keeping ZIP codes, phone numbers and IDs exactly as written.

Example

Input
zip,id 02134,9007199254740993
Result
[ { "zip": "02134", "id": "9007199254740993" } ]

As numbers these would become 2134 and 9007199254740992.

Good to know

  • Keys: taken from the first row. Empty or repeated column names stop with an error.
  • All text: every value is kept as text. Nothing is guessed to be a number, date or true/false.
  • Empty cells: become empty text.
  • Uneven rows: a row with the wrong number of columns stops with an error naming the row.
  • Quoted fields with commas, doubled quotes and line breaks are supported.
  • Text stays in your browser tab and is not saved.

Questions

Why are numbers in quotes?

Converting automatically would strip leading zeros and round IDs longer than 15 digits. Keeping strings is lossless; convert specific fields in your own code if you need numbers.

Will numbers stay numbers?

No, every value becomes a string. That protects leading zeros and long IDs. Convert specific fields to numbers in your own code where you know they are numeric.

Can I get an array of arrays instead of objects?

Not at the moment. The first row is always used as keys, which is what most APIs and scripts expect.

What if a cell contains a line break?

Quoted cells may contain line breaks; they are kept inside the string as \n in the JSON.