ToolsYard

CSV ↔ JSON Converter

Switch between CSV→JSON and JSON→CSV, then paste your data — the result updates as you type.

What this tool does

This tool converts comma-separated (CSV) data into a JSON array of objects, or converts a JSON array of objects back into CSV, updating the result live as you type. It treats the first CSV row as the header (the object keys), handles quoted fields that contain commas or newlines, and escapes quotes properly in both directions. All conversion happens locally in your browser — nothing is uploaded.

Example use case

CSV is the default export format for spreadsheets and databases, but most APIs and JavaScript code expect JSON. Paste an exported CSV here to get a JSON array ready to use in code, or convert an API response's JSON array back into CSV to open in a spreadsheet.

Note on input format

For CSV→JSON, the first line must be a header row, and every other row is turned into one JSON object keyed by those headers. For JSON→CSV, the input must be a JSON array of flat objects; the column headers are taken from the union of every object's keys. Invalid input in either direction is flagged immediately rather than producing garbled output.