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.
- Free, no sign-up
- Nothing is sent to a server
- Worldwide
How to use CSV to JSON online
- Paste or open the CSV. Paste the rows into the box, or open a CSV file from your device.
- Check the separator. The separator is detected. Pick another one if the result looks wrong.
- Choose the options. Say whether the first row holds names, and whether numbers should stay text.
- 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?
Why are my numbers in quotes?
Can a value contain a line break?
What if two columns have the same name?
Does the file leave my device?
Can I turn the JSON back into CSV?
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.