CSV and JSON converter
Convert comma-separated rows to JSON records or turn JSON objects into a CSV spreadsheet. Your inputs stay on your device.
Set up your task
Starting local processing
Ready. Processing stays in this browser.
2 Your result
Your result updates in this browser. Check your input if the result looks unexpected.
How to use CSV and JSON converter
Move a small table between a spreadsheet-style CSV and JSON records. It is useful when a reporting tool accepts a different format from the export you already have.
- Choose the direction and paste the whole input, with column headings for CSV.
- Process the text and compare the first few records against the source.
- Download the new format and import a small test into the destination.
Supported inputs and limits
Paste up to 200,000 characters. Uses a header row, with at most 100 columns, 5,000 rows and 50,000 cells. JSON input must be an array of flat objects.
How it works
A CSV file has rows and columns, but it does not tell the reader reliably whether a value is a number, identifier, date or plain text. Converting to JSON keeps CSV cells as strings, which avoids silently dropping the leading zero from a code. The first row provides property names, so give each heading its own non-empty label.
When converting an array of JSON objects back to CSV, the union of their property names becomes the header. A key missing from a particular record produces an empty cell. Nested objects and lists need a separate modelling decision and are rejected instead of squeezed into a misleading column. Keep identifiers as quoted strings when importing into spreadsheets, which may round large numbers or reinterpret dates.
Cells beginning with spreadsheet formula symbols can be dangerous when opened as a CSV. This exporter prefixes potentially active values with an apostrophe. That can be visible in some importers, especially those that treat every cell as text. Keep the input if you need an exact record of the source.
Example
Convert a CSV with Name and Town columns into a JSON array. Each row becomes an object with those two property names.
Questions about CSV and JSON converter
Will a postal code lose its leading zero when converted to JSON?
CSV values become JSON strings. The characters, including leading zeros and embedded line breaks, are preserved.
Can CSV fields include quoted commas or newlines?
Yes. Put the value in quotes and use two consecutive quotes for a literal quote inside it.
Can I paste a single JSON object?
Use an array of objects, even if you are working with one record. This defines a consistent row-based export.
Related tools
Last updated