quialo.

CSV to JSON Converter

JSON output

Everything runs in your browser. Nothing is uploaded. Quoted fields may contain the delimiter, the quote character (doubled), and line breaks, following the common RFC 4180 rules.

Paste CSV to get a JSON array, or paste JSON to get CSV. The converter handles quoted fields that contain the delimiter, line breaks, and doubled quotes, following the common RFC 4180 rules. Choose your delimiter (comma, semicolon, pipe, or tab) and quote character, decide whether the first row is a header, and optionally infer numbers and booleans. Everything runs in your browser, so nothing is uploaded. For one direction only, see the focused CSV to JSON and JSON to CSV tools.

How to use

  1. Paste CSV or JSON into the input box.
  2. Leave the direction on Auto, or pick CSV to JSON or JSON to CSV.
  3. Set the delimiter and quote character to match your data.
  4. Turn the header row on for an array of objects, or off for an array of arrays.
  5. Copy the converted output, or use Swap to convert it back.

Examples

  • CSV "name,age" then "Ada,36" becomes [ { "name": "Ada", "age": "36" } ].
  • With type inference on, the age 36 becomes the number 36 instead of a string.
  • A field like "London, UK" stays one value because it is wrapped in quotes.

FAQs

Which way does it convert?
Both ways. On Auto it treats text that starts with a bracket or brace and parses as JSON as JSON, and converts it to CSV. Anything else is treated as CSV and converted to JSON. You can also force a direction with the toggle.
How is the JSON shaped?
With the header row on, CSV becomes an array of objects keyed by the first row. With it off, CSV becomes an array of arrays. Going the other way, an array of objects produces a header from the union of all keys, and an array of arrays is written row for row.
What do the delimiter and quote settings do?
The delimiter separates columns: comma, semicolon, pipe, or tab. The quote character wraps fields that contain the delimiter, a line break, or the quote itself, which is escaped by doubling it. Set both to match the file you are converting.
Will it change my values, like zip codes?
Only if you turn on type inference, and even then it is careful. Clean integers and decimals become numbers, true and false become booleans, and null becomes null. Values with leading zeros, like a zip code, stay strings so they are never mangled. With inference off, every value stays a string.
How is this different from the one way CSV tools?
The CSV to JSON and JSON to CSV tools each do a single direction with comma separated input. This converter does both directions and adds a configurable delimiter and quote, a header toggle, and type inference, which is handy for semicolon or tab files and for round tripping data.
Is my data sent to a server?
No. Parsing and formatting happen entirely in your browser, so it is safe to paste private data. Nothing is uploaded or stored.

Related tools