CSV to JSON Converter
Turn a flat table into a JSON array.
About this tool
Each later row becomes one object when Header row is on. The header cells are the keys, and the cells in that row are the values. A short row does not invent missing columns.
JSON to CSV Converter is the reverse. Nested JSON is flattened into columns on that page.
How to use it
- Paste the table or open a file. The parsed table shows how the input delimiter was read.
- Leave Header row on to use the first row as keys. Turn it off for an array of arrays.
- Convert to JSON and copy the array.
Limitations
- With Header row on, the first row names the keys. With it off, the result is an array of arrays.
- A delimiter inside a quoted field stays in the cell. The parser is for a flat table, not a spreadsheet with multiple sheets.
Rows of strings, or rows of arrays
The source dialect splits cells before any JSON exists
Separator, quote, and escape come from the input dialect. Auto detection tries comma, semicolon, tab, and pipe, and it picks the candidate that yields the most consistent widths. A custom separator has to be one character, and it cannot be the same character as the quote. Newlines inside a quoted cell stay inside the cell. A quote is escaped by doubling when the escape character is the quote itself, or by the escape character you set.
When the header control is on, the first row supplies keys and each later row becomes an object. Every value is a string. The token 1 does not become a number. An empty cell becomes an empty string, which is not a JSON null. When the header control is off, the result is an array of arrays of strings. No keys are invented from column positions on that path.
Repeated names and extra cells are dropped
If two header cells share a name, the later cell overwrites the earlier one in the object. The first value disappears. Cells past the end of the header are ignored. A short data row leaves empty strings for the missing keys. None of that is recoverable from the JSON. A CSV simply has no nesting, so the objects are flat. A dotted header such as role.title is one key whose name contains a dot. It does not become a nested object.
Types you might have wanted
Booleans are not inferred. Dates are not inferred. Leading zeros stay, because the cell never became a number. That is the opposite of a YAML load, which may turn a zero-padded token into a number before a later conversion. Here the characters in the cell are the JSON string. Use this page to lift a table into JSON objects or into arrays. Use a JSON-to-CSV conversion in the other direction only with the knowledge that flattening and this string rule do not mirror each other for nested documents.
Privacy
Your input is processed in your browser and is not uploaded to UtilChain. File names, text, and results are not sent to analytics.

