CSV to JSON: Headers, Separators and Number Types

What is it?

CSV to JSON turns a CSV or TSV table into a JSON array, ready for code, APIs and config files.

Who is it for?

Developers loading spreadsheet data into apps, testers creating fixtures, and anyone turning an Excel sheet into data for a website or API.

How to use it

  1. Paste the CSV, or copy cells straight from Excel or Google Sheets (that pastes as tab-separated text).
  2. Leave Separator on Detect, or pick comma, semicolon or tab.
  3. Tick First row is the header to get objects with keys; untick it to get arrays of values.
  4. Tick Numbers and true/false as values to get 42 and true instead of "42" and "true".

Columns come out wrong

  • Commas inside a value (like “Delhi, India”) must be wrapped in double quotes in the CSV. Files saved by Excel already do this.
  • Wrong separator detected: choose it yourself.
  • Duplicate or empty headers make confusing keys. Give every column a unique name.

Watch out for types

  • With number types on, phone numbers and PIN codes lose their leading zeros, and long IDs lose precision. Untick it, or fix those fields afterwards.
  • Dates stay as text; convert them in your code.

Worked example

name,age / Asha,30 with headers and types becomes [{"name":"Asha","age":30}]. Without the header option it becomes [["name","age"],["Asha","30"]]: arrays of values, useful when the first row isn’t a header.

Open the tool: CSV to JSON

Still stuck?

Contact support. Tell us which tool or page you were using, what you tapped, what you saw, and your phone or computer and browser (for example: Android phone, Chrome). We reply by email.

Questions, or an error not listed here?

Tell us in the comments: what you were doing, the exact message you saw, and your device and browser. We read every comment and add new fixes to this article.