How do I convert CSV to JSON?

Convert CSV to JSON, JSON to CSV and XML to JSON, plus TSV, JSON Lines, form data and Markdown, warning you of anything lost. Free; nothing leaves your browser.

Paste the CSV or open the file. The format is detected, and each row becomes an object named by the header row. Values stay text unless you tick Detect types, which turns 36 into a number, true and false into true and false, and empty cells into null. A value such as 007 or 12345678901234567890 stays text, because reading it as a number would change it.

How do I convert JSON to CSV?

Choose CSV under To. An array of objects gives one row per object and one column per key. Nested values become columns with dotted names, such as user.name and tags.0, or, if you prefer, JSON text in one cell. Numbers keep their exact digits. Cells starting with =, +, - or @ get a ' in front, so a spreadsheet shows them as text instead of running them as formulas.

What does the converter warn about?

The formats do not all hold the same things: CSV has no types or nesting, and form data has only text. Whenever a conversion loses something, such as a null written as an empty cell or a row with more fields than the header, the page says what and where, rather than guessing quietly.

How do I convert XML to JSON?

Paste the XML or open the file. Attributes become keys starting with @, an element's text becomes #text when it also has attributes or children, and repeated elements become a list. Choose XML under To to go the other way: @ keys become attributes again, and a list becomes the element repeated. Converting XML to CSV uses the repeated element as the rows. For safety, documents with a <!DOCTYPE> are refused, which rules out entity expansion attacks.

Form data and query strings

Paste a query string, a whole URL or a form body (application/x-www-form-urlencoded) to read it as JSON. Keys with brackets, such as user[name] and tags[], build nested objects and arrays, as PHP, Rails and Express read them; choose Flat to keep every key exactly as written. CSV becomes one form body per row.

Large files

Files up to 50 MB can be converted. Large ones are converted in the background, so the page stays responsive, and the result box shows the start; Copy and Download take the whole result. Your data never leaves this page.