Menu
PDF Tools
Image Tools
Converters & Utilities
Seller & Print Tools
Accounting & Business
Calculators
Text & Writing Tools
Developer & Web Tools
Creator & Social Tools
Browser Utilities & Games
Document & Design Makers
Text & Developer Tools
Exam & Form Tools

CSV to JSON

CSV to JSON turns comma, semicolon, tab or pipe separated rows into a JSON array of objects, using the first row as keys. It runs in your browser.

How to use CSV to JSON online

  1. Paste or open the CSV. Paste the rows into the box, or open a CSV file from your device.
  2. Check the separator. The separator is detected. Pick another one if the result looks wrong.
  3. Choose the options. Say whether the first row holds names, and whether numbers should stay text.
  4. Copy the JSON. Copy the result into your code or your file.

Why use this free CSV to JSON

  • Comma, semicolon, tab and pipe
  • Quoted fields and line breaks
  • First row as keys or plain arrays
  • Optional real numbers and booleans
  • Clear error with line number
  • Nothing sent, nothing stored

From rows to objects

CSV is a plain table: one row per line, values divided by a separator. JSON is what most programs and web services want. This tool reads each row after the first and builds an object whose keys are the column names, so the table can go straight into code, a test file or an API request.

Separators and quotes

Files from different programs use different separators. Many European spreadsheets use a semicolon because the comma is the decimal mark. The tool looks at the first line and picks the separator that appears most often outside quotes, and you can choose one yourself. A value wrapped in double quotes may hold the separator and even a line break, and two quotes in a row mean one quote character.

Text or numbers

By default every value stays text, exactly as written. That is the safe choice, because an identifier such as 007 would lose its zeros as a number. Tick the numbers box to turn plain numbers into JSON numbers and the words true and false into booleans. Values that would change when converted, such as 007, stay as text. For example, 31 becomes the number 31, and 007 stays 007.

Names that repeat or are empty

JSON objects cannot hold the same key twice. If two columns share a name, the second becomes name_2, and further repeats carry on counting. A column with no name is called column_1, column_2 and so on, by its position. With the first-row option off, you get an array of arrays instead and no names are needed.

Errors and limits

If a quote is in the wrong place or a quoted value never ends, the tool says so and gives the line. Files you open are read in this tab and must be smaller than five megabytes. For very large tables, a spreadsheet program or a command line tool is a better fit.

CSV to JSON: frequently asked questions

Which separators are supported?
Comma, semicolon, tab and pipe. The tool picks one from the first line, and you can override it.
Why are my numbers in quotes?
Values stay text unless you tick the numbers box. This protects identifiers such as 007.
Can a value contain a line break?
Yes, if the value is wrapped in double quotes.
What if two columns have the same name?
The later ones get a number added, such as name_2, so no key is lost.
Does the file leave my device?
No. The file is read in your browser and nothing is uploaded.
Can I turn the JSON back into CSV?
Yes. The JSON to CSV tool on this site does the reverse.

Related searches for CSV to JSON

  • CSV to JSON online
  • free CSV to JSON
  • CSV to JSON online free
  • CSV to JSON for mobile
  • CSV to JSON without sign up
  • convert csv to json
  • csv to json converter
  • CSV to JSON – Text & Developer Tools

CSV to JSON is a free online tool on MAITBOX, in the Text & Developer Tools group. It runs in your browser, so what you type is not sent to a server. It works on Android and iPhone, and on Windows, Mac and Linux, with no download and no account.

More tools in Text & Developer Tools →

Search tools