CSV to JSON Converter
Convert CSV to JSON (and back) with header mapping and type inference.
Free · No sign-up · Runs locally in your browser · Also available in Chinese (中文)
What is CSV to JSON Converter?
CSV is the lingua franca of spreadsheets and data exports; JSON is the lingua franca of APIs and JavaScript. Converting between them is a daily glue task — and the classic pitfalls are quoted fields containing commas, embedded newlines and whether 'age: 32' should become a number or stay a string.
This converter handles the RFC-4180 quoting rules correctly, uses the first row as object keys, and infers types (numbers, booleans, null) with an option to disable inference and keep everything as strings. It also runs the reverse: JSON arrays of objects flatten back into clean CSV.
How to use it
- 1Paste CSV text or drop a .csv file onto the page.
- 2Confirm the delimiter (comma, semicolon or tab) if the preview looks misaligned.
- 3Toggle type inference and the 'first row is header' option as needed.
- 4Copy or download the JSON (or the CSV when converting the other way).
Common use cases
- Turning a spreadsheet export into JSON for a frontend or an API mock.
- Flattening API responses into CSV for analysis in Excel or Sheets.
- Cleaning up a semicolon-delimited European CSV into standard JSON.
Frequently asked questions
▸Why do my numbers arrive as strings?
Type inference is on by default but conservative: values with leading zeros, plus signs or mixed digits may intentionally stay strings to preserve meaning. Turn inference off entirely if you want raw strings everywhere.
▸How are commas inside fields handled?
Fields wrapped in double quotes may contain commas and even line breaks per the CSV standard. The parser follows RFC-4180, so quoted content survives conversion intact.