CSV to JSON Converter
Parse CSV, TSV, or pipe-separated data into JSON with type inference.
Written by Golam Rabbani, Founder & Lead Engineer
How to use this csv to json converter
- Paste your CSV (or TSV / pipe-separated) data into the input box.
- Choose the delimiter so the parser splits columns correctly.
- Pick whether the first row is a header or plain data.
- Decide whether numbers and booleans should be inferred from their text form.
- Press Convert to render the JSON output, then copy or reset.
About this csv to json converter
The CSV-to-JSON converter implements the RFC 4180 quoting rules: fields wrapped in double quotes can contain the delimiter, line breaks, and embedded "" pairs that decode back to a single quote. Outside of quotes, the chosen delimiter splits columns and a CRLF or LF terminates the row. When the header option is on, the converter keys each output object by the column name from the first row; otherwise it returns an array of arrays so the structure mirrors the source.
Type inference is opt-in. With it on, a cell of "36" becomes the number 36 and "true" becomes the boolean true, which is what most APIs and spreadsheets expect. With it off, every cell stays a string so you can preserve leading zeros (postcodes, IDs) or numbers that should be treated as labels. Everything runs in your browser, so confidential rows never leave your machine.
For example, the input "name,age\nAda,36\nLinus,54" with the comma delimiter, the header row enabled, and type inference on produces: [ { "name": "Ada", "age": 36 }, { "name": "Linus", "age": 54 } ]
FAQ
- How are quoted fields handled?
- A field that begins with a double quote is read until the matching closing quote. Inside it, "" is decoded to a single ". This lets cells contain commas, line breaks, and quotes without breaking the column count.
- What if my first row is not a header?
- Pick the "Plain data" option. The converter then returns a two-dimensional array rather than an array of keyed objects, so every row is represented faithfully.
- When should I turn type inference off?
- Whenever the strings look like numbers but should stay as text — postcodes, phone numbers, leading-zero IDs, version strings. Inference is a convenience, not a guarantee.
- Does it support TSV and pipe-separated files?
- Yes. Pick the Tab or Pipe delimiter from the dropdown and the parser splits columns on that character instead of a comma.
- Is my CSV uploaded?
- No. Parsing runs entirely in your browser.
- Why are some values null?
- With type inference on, the literal string "null" decodes to JSON null. If you need it to stay as the text "null", turn type inference off.