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
name,age,city Alice,31,Seattle Bob,28,Austin
[{"name":"Alice","age":"31","city":"Seattle"},{"name":"Bob","age":"28","city":"Austin"}]
[{"id":101,"status":"new","owner":"Mina"},{"id":102,"status":"done","owner":"Ravi"}]
id,status,owner 101,new,Mina 102,done,Ravi
[{"sku":"A-100","price":"4.99"},{"sku":"B-205","stock":"40"}]
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
JSON Pretty Print, Minify, and Validate
Format JSON for readability, minify it for compact storage, and validate it before using it in APIs, config files, frontend apps, or test fixtures. This tool is useful when debugging payloads, comparing responses, cleaning copied JSON, or shrinking data for transport and logging. ToolMill processes everything in your browser, making it a fast privacy-friendly option for working with sensitive JSON.
Data
JSON to CSV Converter
Convert JSON into CSV format directly in your browser for spreadsheet imports, reporting exports, analytics workflows, and quick data cleanup. This tool is useful when you need to flatten structured JSON into rows and columns for Excel, Google Sheets, BI tools, or CSV-based systems. ToolMill runs locally for privacy, handles common export scenarios quickly, and works offline after installation.
Data
JSON ↔ YAML Converter
Convert JSON to YAML and YAML to JSON instantly in your browser. Great for config files (Kubernetes, Docker Compose, CI/CD pipelines) and for turning API payloads into readable YAML. ToolMill runs client-side for privacy, supports pretty output, and can work offline when installed as a PWA.
Data
JSON Validator
Validate JSON and get precise, line-by-line error messages. Use it to catch subtle issues like trailing commas, comments, unescaped characters, and malformed numbers before shipping configs or API payloads. Runs entirely in your browser for privacy and can work offline when installed as a PWA.
Data
