Add to Chrome Add to Edge

CSV To JSON

Turn spreadsheet rows into a JSON array, using the header row as keys.


CSV To JSON

Spreadsheets and exports come as CSV, while APIs, scripts and front-end code prefer JSON. Paste your rows and the header line becomes the keys of each JSON object.

How to use CSV To JSON

  1. Paste your CSV, with a header row, into Enter your CSV Data.
  2. Tick Pretty Print JSON if you want indented, readable output.
  3. Click Convert to JSON and copy the result.

When it comes in handy

  • Turning spreadsheet exports into fixtures and seed data for apps.
  • Feeding CSV data into an API or JavaScript project.
  • Checking how a CSV file will look as structured data.

Frequently asked questions

What if a value contains a comma?
Wrap it in double quotes in the CSV, as spreadsheet programs do when they export, so the comma is not treated as a separator.
Are numbers converted to numbers?
Check the output for the types you need. If a field must stay text, such as a postcode with a leading zero, verify it before using it in code.

Related guides

Choose which cookies SEOpeck may use. You can change this at any time from "Cookie settings" at the bottom of every page.

Your tools

    Saved in this browser only. Nothing is sent to us.

    Popular tools