CSV to JSON
Convert CSV rows into JSON objects or arrays with explicit headers and optional value conversion.
How it works & useful details
Formats & limits
Import UTF-8 text up to 1.5 MB or paste up to 500,000 characters. CSV accepts comma, tab, semicolon or pipe separators, doubled quotes and line breaks inside quoted fields. All rows must have the same number of fields. A final line ending is ignored; interior blank rows are real rows. A leading UTF-8 BOM is removed. Up to 10,000 rows including the header, 100 columns, 100,000 cells and 50,000 characters per cell. Output is limited to 2,000,000 characters.
Live previews pause above 50,000 input characters; exports still process the full bounded input. The table pages through 15 rows and 12 columns at a time. Export includes every result row. Processing is synchronous and bounded; cancellation is checked before and after a transformation.
Data details
Text comparisons use Unicode code-unit order, with optional case folding. Numeric sorting/filtering requires finite numbers in every selected cell and uses JavaScript decimal precision; large integer identifiers need text mode. No trimming or spreadsheet formulas are evaluated.
CSV-to-JSON defaults to strings. JSON object export requires unique, nonempty headers. JSON input uses object keys in discovery order (integer-like keys follow JSON property order), missing properties become empty cells, and arrays must be rectangular. Primitive arrays get one “Value” column. Null becomes the literal text “null” by default; nested objects/arrays become compact JSON strings. Empty strings, missing values and optional empty nulls are indistinguishable in CSV. Mixed row shapes are rejected. JSON numbers use JavaScript precision; unsafe integers are rejected, so quote large IDs. Duplicate JSON names use the last value.
Transpose allows up to 100 source rows including the optional header, and exports all transposed cells as data. Spreadsheet formula protection is opt-in: it prefixes formula-like cells with an apostrophe, visibly changing their data. Spreadsheet programs differ; review results before opening them.
About this tool
CSV to JSON converts tabular rows into JSON objects or arrays with explicit headers. It is useful for preparing spreadsheet exports for an API, a script, or a JavaScript data file.
Values are treated as strings by default so identifiers keep their digits and leading zeros. Optional conversions for numbers and booleans are available but off until you enable them. The conversion is local and warned about where data would be ambiguous.
How to use it
- Import a CSV file or paste the text.
- Choose the output shape: an array of objects or of arrays.
- Enable number or boolean conversion only if that is what your data needs.
- Preview the JSON and export or copy it.
Worked example
The CSV
Name,Score,Active,Zip
Ada,92,true,01234
Sam,,false,90210converts to an array of objects keyed by the header. With value conversion switched on, the result is:
[
{ "Name": "Ada", "Score": 92, "Active": true, "Zip": "01234" },
{ "Name": "Sam", "Score": "", "Active": false, "Zip": 90210 }
]Without conversion, every value stays a string: "92", "true". Note that "01234" stays a string even with conversion, because turning it into 1234 would lose the leading zero.
Strings or typed values?
CSV has no data types, so every cell is text. Keeping strings is the safe default: IDs, postal codes, phone numbers, and account numbers keep their exact form. Convert values when the JSON feeds something that expects real numbers and booleans, such as a chart or an API. Check columns like Zip afterwards. 90210 becomes a number while 01234 does not, so a mixed column ends up with mixed types.
Choose array output when the consumer needs rows as lists, such as a table component or a CSV-to-SQL script, or when there is no header row. Choose objects when field names matter. Empty cells become empty strings, not null, so blank values remain distinguishable from the word "null".
Frequently asked questions
Why does my numeric ID change when conversion is on?
JavaScript numbers cannot represent very large integers exactly. Keep large IDs as strings, which is the default behavior.
How are missing values represented?
Empty cells become empty strings by default, and the workspace reports the chosen handling so the output is predictable.
What are the limits?
Up to 10,000 rows, 100 columns, and 100,000 cells, with exports capped at 2,000,000 characters.
What if two columns have the same header?
Object keys must be unique, so duplicate or empty headers are reported instead of silently overwriting a column. Rename the headers or use array output.
