nebxJSON
GitHub
Menu

CSV to JSON

Ln 1, Col 1

The result appears here.

Free tool · runs in your browser

CSV to JSON converter

Paste or drop a CSV file and get an array of JSON objects, one per row, keyed by the header row. Commas, semicolons, tabs and pipes are detected, and quoted fields are read correctly.

Types, carefully

Numbers and true/false become JSON values. Values that would change, like 007 or very long numbers, stay text. Turn off Detect types to keep everything as text.

Nested keys

Headers like address.city become nested objects, the reverse of JSON to CSV.

Real-world CSV

Quoted fields with commas, doubled quotes and line breaks are read as RFC 4180 describes. A byte-order mark from Excel is ignored.

Shortcuts

Ctrl/⌘ Enter
Format
Ctrl/⌘ Shift M
Minify
Ctrl/⌘ F
Find in the editor
Ctrl/⌘ Alt [
Fold all

Questions

Does the CSV need a header row?

Yes. The first row gives the keys. Empty headers become column1, column2 and so on, and repeated headers get _2, _3 added.

Are numbers converted?

With Detect types on, values like 42, -3.5 and true or false become JSON numbers and booleans, and null becomes null. Values that would lose information, such as 007 or integers too large to store exactly, stay text. Empty cells are empty strings.

Which delimiters are supported?

Comma, semicolon, tab and pipe. The delimiter is detected from the first lines, or you can pick it.

Is my data uploaded?

No. Everything is converted in your browser. Nothing you paste is uploaded or stored; only your layout and option choices are remembered.