ToolMill.io

JSON ↔ CSV Converter

Convert JSON to CSV or CSV to JSON instantly in your browser. Useful for spreadsheets, exports, analytics, and quick data cleanup. This page is designed for quick tabular data reshaping: CSV rows become JSON objects, and arrays of JSON records become CSV columns and rows. ToolMill runs client-side for privacy and works offline after installation.

Data

Try it

Examples

People data CSV to JSON
Input
name,age,city
Alice,31,Seattle
Bob,28,Austin
Output
[{"name":"Alice","age":"31","city":"Seattle"},{"name":"Bob","age":"28","city":"Austin"}]
JSON array to CSV
Input
[{"id":101,"status":"new","owner":"Mina"},{"id":102,"status":"done","owner":"Ravi"}]
Output
id,status,owner
101,new,Mina
102,done,Ravi
Rows with missing fields
Input
[{"sku":"A-100","price":"4.99"},{"sku":"B-205","stock":"40"}]
Output
sku,price,stock
A-100,4.99,
B-205,,40

How this converter works

CSV → JSON reads the first row as column names and turns each later row into one object. JSON → CSV works best with a single object or an array of plain objects. In that direction, the converter gathers keys across the records to build a header row, then writes each object as one CSV line.

This is a quick browser-based reshaping tool rather than a full import pipeline. It is useful when you need to inspect a pasted export, reformat a small API sample, or prepare a spreadsheet-friendly version of copied records without opening another app.

When to use CSV → JSON vs JSON → CSV

Use CSV → JSON when your source data already looks like rows and columns: spreadsheet exports, CRM downloads, product tables, contact lists, or copied report snippets. Use JSON → CSV when you have a JSON array from an API, script, or fixture and need rows for Excel, Google Sheets, or CSV-based uploads.

If your goal is a quick review in a spreadsheet, CSV is usually easier to scan. If your goal is preserving column labels as named properties for code, JSON is usually the better destination format.

Header rows, columns, and missing values

On CSV → JSON, the first row is treated as headers. Every later row is mapped against those headers in order. If a row is shorter than the header row, the missing values become empty strings in the JSON output. On JSON → CSV, the converter combines keys found across the objects to create the CSV columns.

That means rows with inconsistent keys can still be exported, but you may see blank cells for fields that are missing on some records. This behavior is useful for quick cleanup, but it also means you should normalize your records if you need a strict schema.

Quoting, commas, and type handling

When JSON is exported to CSV, fields that contain commas, quotes, or line breaks are quoted so the resulting CSV stays readable in spreadsheet-style workflows. Embedded double quotes are escaped by doubling them. On the reverse path, quoted CSV cells with commas are parsed correctly before JSON objects are created.

CSV → JSON does not infer types. Values such as 31, 4.99, or true remain strings in the JSON result unless you convert them later in your own app or script. That detail matters when you are preparing payloads for APIs or systems that expect real numbers or booleans.

Input formats that work best

For CSV input, include a header row, keep column counts reasonably consistent, and quote fields that contain commas or line breaks. For JSON input, use a single object or an array of simple objects. Deeply nested objects and arrays are usually a sign that a dedicated flattening step is needed before CSV export will be easy to use.

Troubleshooting conversion problems

Before You Rely on Converted JSON

Before sending the output into another app or API, check the header row, delimiter assumptions, quoted fields, and whether values that should be booleans or numbers still need explicit cleanup. A valid-looking array can still carry the wrong meaning if the original CSV was inconsistent.

What CSV-to-JSON Conversion Does Not Validate

Conversion does not confirm that headers are meaningful, rows are unique, numeric fields were typed correctly, or the resulting objects satisfy a downstream schema. This page reshapes the data for inspection and reuse, but it does not replace validation or data-quality review.

How to Interpret the JSON Output Before Using It Elsewhere

Review the generated objects before treating them as production-ready data. Header names become keys, row order becomes object order in the array, and every value imported from CSV starts as text unless you convert it later. That means the structure can look right while types or field labels still need cleanup.

If JSON → CSV fails, the most common cause is invalid JSON syntax or input that is not a single object or array of objects. If CSV → JSON gives unexpected output, check the first row, inconsistent column counts, and whether your pasted text contains unmatched quotes or broken line structure.

This page is designed for quick conversion of pasted tabular content. It does not replace a full data-cleaning workflow, schema mapper, or advanced CSV import tool with custom delimiters and column rules.

Related tools