Paste your CSV. It’s turned into JSON as you type, on your device.
0 characters · 0 lines
Delimiter
More options
Indent
Result
Your result will appear here.
0 characters · 0 lines
What it does
CSV from a spreadsheet or a database export becomes JSON you can use in code or send to an API:
First row is the header gives an array of objects keyed by the header’s names. Turned off, you get an array of arrays.
Detect numbers, true/false and empty cells turns 12.50 into a number, true into true and an empty cell into null. Everything else stays text.
Delimiter reads commas, semicolons, tabs or pipes, and Auto finds the one your text uses.
Quoted values can hold the delimiter, line breaks and double quotes, written twice ("").
Rows shorter than the longest one are filled with null, or with "" when Detect is off. With the header on, values past the header’s last column get keys by their position, such as column_6 after a five-column header.
Indent, under More options, puts 2 spaces, 4 spaces or a tab per level, or Minify leaves out every space and line break.
How to use it
Paste or type CSV into “Your text”. Select “Try a sample” to see a product list.
Check the options. The result updates as you type, with its rows, columns and delimiter above it.
Select Copy to put the JSON on your clipboard, or Download JSON to save it as a .json file.
Good to know
The limit is 2,000,000 characters of CSV at a time, and a result of up to 10,000,000 characters.
Use one kind of line break in the whole text. If Windows (CRLF) and Unix (LF) line breaks are mixed, a value can keep a stray carriage return (\r), or two rows can run together.
A value that opens a double quote and never closes it stops the conversion, and the message names the line it starts on.
Privacy
Your CSV is processed on your device: converting runs in your browser, and nothing you paste is uploaded.
Advertisements
Frequently asked questions
How is the header row used?
With First row is the header on, each later row becomes a JSON object and the header’s names are its keys. A blank name becomes `column_1`, `column_2` and so on, by its position, and a repeated name gets `_2`, `_3` added, so every key is different. Turn the option off to get an array of arrays, one per row, the first row included.
How are numbers and true/false read?
With Detect numbers, true/false and empty cells on, a value written as a JSON number, like `12.50`, `-3` or `1e5`, becomes a number with every digit kept as written, so nothing is rounded. `true` and `false`, in any mix of capitals, become JSON’s `true` and `false`, and an empty cell becomes `null`. Anything else stays text: `007` keeps its leading zeros, and `+5`, `.5` and `1,5` stay text too. Turn the option off to keep every value as text, with empty cells as `""`.
Which delimiters can it read?
Comma, semicolon, tab and pipe. Auto picks one of the four from the text itself, and the Delimiter line above the result names it, such as “Semicolon (detected)”. Text with only one column is read as comma-separated. If Auto picks the wrong one, choose the delimiter yourself.
Why does my Excel CSV use semicolons?
Where the comma is the decimal separator, as in Germany, France or Brazil, Excel saves CSV files with semicolons between the values. Auto detects them, so the file converts like any other. A value such as `12,50` stays text, since a comma can also separate thousands; change the comma to a point first if you need a number.
Is my CSV uploaded?
No. Converting runs in your browser, on your device, and nothing you paste is uploaded.