CSV to JSON Converter (Auto-generate Keys from Header Row)
Convert CSV to a JSON array. Paste or upload a file and process locally for privacy.
Paste CSV to convert instantly to JSON. Be careful when handling CSVs with personal data.
Large CSVs (5MB+) may take longer to process.
CSV → JSON Converter
CSV Input
Your input stays in the browser and is not sent to a server.
JSON Output
Танзимот
Basic
Duplicate headers get _2, _3 suffixes to stay unique.
Имконоти пешрафта
Shift-JIS only applies to file uploads.
How to use (3 steps)
Paste CSV or choose a file
Adjust options (header/type/empty cells) if needed
Convert → Copy or Download
Examples
Input CSV
name,age,active Alice,30,true Bob,25,false
[
{ "name": "Alice", "age": 30, "active": true },
{ "name": "Bob", "age": 25, "active": false }
]
Empty cells (empty → null)
name,age Alice, Bob,25
[
{ "name": "Alice", "age": null },
{ "name": "Bob", "age": 25 }
]
Conversion tips
- CSV to JSON conversion changes based on header, delimiter, and type inference settings.
- For better csv to json accuracy, manually set the delimiter if auto-detect fails.
- When converting CSV to JSON, keep leading zeros (0012) as strings for safety.
- CSVs over 5MB may take longer to process.
Conversion rules
- Header on: first row becomes keys. Empty headers become col1, and duplicates become name_2, name_3, etc.
- Header off: keys are col1, col2... and column count is fixed to the maximum column length.
- Type inference ON: true/false, null (string), and numbers are detected. Leading zeros remain strings by default.
- Empty cells: choose "" (empty), null, or omit the key entirely.
- Delimiter: auto-detect chooses the most consistent of , / / ; / |.
- Uneven columns: missing cells are filled; extra cells are treated as new columns with row warnings.
Саволу ҷавоб
Should I treat the first row as a header?
Yes/No can be toggled. When OFF, col1, col2... are generated automatically.
Numbers are staying as strings
Use the type inference toggle. OFF keeps everything as strings; ON converts numbers and true/false.
Do empty cells become null?
Choose "" (empty), null, or omit the key entirely.
Can I convert TSV as well?
Yes. Set the delimiter to Tab or try Auto detection.
Does it handle commas/newlines inside quotes?
Yes. It supports quoted fields. If parsing fails, specify the quote or delimiter manually.
What if header names are duplicated?
Duplicates are renamed with _2, _3 suffixes and shown in warnings.