Code Tools

CSV to JSON

All tools

Paste spreadsheet rows with a header line and get a JSON array of objects, one per row.

How it works

Four simple steps

1

Paste CSV

Include the header row; its cells become the JSON keys.

2

Quotes handled

Quoted fields may hold commas, line breaks and doubled quotes.

3

Rows become objects

Each data row turns into one object in a JSON array.

4

Save data.json

Copy the indented JSON or download it.

CSV to JSON

About CSV to JSON

Product data lives in a spreadsheet maintained by the marketing team, and your front end needs it as JSON for a static build. Export the sheet as CSV, paste it here, and you have an array ready to commit.

The parser reads the first row as column names (trimmed of surrounding spaces) and turns each following row into an object with those keys. It handles the tricky parts of CSV properly: fields wrapped in double quotes may contain commas and line breaks, doubled quotes inside them become a single quote, a byte order mark at the start of an Excel export is removed, and both Windows and Unix line endings work. Completely empty rows are skipped. Output is indented JSON that updates as you type and downloads as data.json.

Every value comes out as a string, including numbers and true or false, because CSV carries no type information. Duplicate column names overwrite each other, so make headers unique before pasting, and note that the delimiter must be a comma. To browse a large result, open it in the JSON Viewer. To go the other way, use JSON to CSV, and for database seeding the CSV to SQL tool skips the JSON step entirely.

Parsing is done character by character in the browser, so spreadsheets with personal details are not uploaded.

Keyboard shortcut

Ctrl Enter - Run tool
FAQ

Frequently asked questions

See all FAQs

Answers for this tool. For site-wide help, open the FAQ hub.

CSV has no data types, so the converter keeps every cell as a string rather than guess. That protects values like the ZIP code 02134, which would lose its leading zero as a number. Convert specific fields in your code.

Missing cells become empty strings for the remaining keys. Extra cells beyond the header are ignored.

Not directly; only commas are treated as separators. Re-export with a comma delimiter, or replace semicolons with commas if no cell contains either character.

View more FAQs

Related tools

View all

HTML Formatter

Beautify and indent HTML markup.

Open

CSS Formatter

Format and pretty-print CSS.

Open

JS Formatter

Beautify JavaScript code.

Open

JSON Formatter

Beautify and validate JSON.

Open

Explore 321 free tools

Everything you need as a developer, marketer or creator - in one beautiful place.

Browse all tools