JSON ↔ CSV Converter
Convert JSON arrays to CSV spreadsheets and CSV files back to JSON. Choose your delimiter, control header rows, and flatten nested objects. Download the result directly — no server required.
Why use our online JSON ↔ CSV Converter?
Transform JSON arrays to CSV spreadsheets and CSV files back to JSON in your browser without uploading your data. Useful for importing API responses into Excel or Google Sheets.
How to use JSON ↔ CSV Converter
- 1Choose conversion direction
Select JSON → CSV to convert a JSON array to a spreadsheet-friendly format, or CSV → JSON to parse CSV rows into a JSON array.
- 2Paste or type your data
Enter your JSON array or CSV text into the input field. JSON must be an array of objects. CSV must have a header row.
- 3Configure options
Choose your delimiter (comma, semicolon, or tab), and toggle whether to include a header row. For nested JSON objects, enable the flatten option to collapse nested keys with dot notation.
- 4Review the output
The converted result appears in the output panel with row and column counts shown. Review it before downloading.
- 5Download or copy
Click Download to save the file as .csv or .json, or use the Copy button to copy the output to your clipboard.
JSON and CSV — the two most common data exchange formats
JSON and CSV occupy complementary niches in data exchange. JSON (JavaScript Object Notation) is hierarchical — it can represent nested objects, arrays, and mixed types natively. It is the dominant format for web APIs, configuration files, and NoSQL database records. CSV (Comma-Separated Values) is flat — it represents tabular data as rows and columns with no nesting. It is the universal format for spreadsheets, data exports, and database dumps.
The conversion between them is inherently lossy in one direction: CSV to JSON is lossless (each row becomes an object with column-header keys), but JSON to CSV requires flattening nested structures. A JSON object like {"name": "Alice", "address": {"city": "Paris"}} cannot be represented in a single CSV cell without flattening (producing an address.city column) or serializing the nested value as a string (losing the structure).
When to use each: use JSON for APIs and programmatic consumption where type information (numbers, booleans, nulls, nested objects) must be preserved. Use CSV for data intended for human review in a spreadsheet, for bulk database imports, and for sharing flat tabular data across different systems and programming languages — CSV is readable by every data tool ever built.
CSV parsing edge cases — why CSV is harder than it looks
CSV appears simple — comma-separated values on each line. In practice, the format has enough ambiguity to cause parsing failures regularly.
The quoting rule: if a field contains a comma, newline, or double-quote, it must be wrapped in double quotes. A double-quote inside a quoted field is escaped by doubling it. So the value He said, "hello" becomes: "He said, ""hello""" in CSV. Many CSV files in the wild don't follow this rule correctly, producing files that parsers choke on.
The delimiter problem: CSV is nominally comma-separated, but the actual separator varies by locale. European locales that use commas as decimal separators (1.234,56 for one-thousand two-hundred thirty four point fifty-six) typically use semicolons as field separators to avoid ambiguity. This is why this tool offers semicolon and tab as alternative delimiter options.
Newlines in fields: a quoted field can span multiple physical lines. A parser that assumes one record per line will break these multi-line fields into separate rows. Proper RFC 4180-compliant parsers handle this correctly.
Trailing newlines and BOM: some CSV exporters add a trailing newline or a UTF-8 BOM (byte order mark, 0xEF 0xBB 0xBF) at the start of the file. Robust parsers strip these; fragile parsers produce an extra empty row or treat the BOM as part of the first field name.
Working with JSON APIs — extracting and reshaping data
A common workflow: an API returns a complex JSON array of objects, and you need to analyze or present the data in a spreadsheet. This tool bridges that gap.
Step 1: copy the JSON response body from your browser's network tab, Postman, or curl output. Paste it into the JSON → CSV converter. If the response is a single object (not an array), wrap it: [{...}] to make it an array before converting.
Step 2: choose the right delimiter. For direct import into Excel or LibreOffice Calc on US locale systems, use comma. For European locales that use semicolons in their regional CSV format, use semicolon or import using the "Text Import Wizard" with explicit delimiter selection.
Step 3: handle nested fields. If the API returns objects like {"user": {"name": "Alice", "email": "a@b.com"}}, enable the Flatten option to produce user.name and user.email as separate columns. Without flattening, the nested object appears as a JSON string in a single column — which is valid but less useful for spreadsheet analysis.
Step 4: for the reverse — data cleaned or enriched in a spreadsheet needs to go back into a database or API — export the spreadsheet as CSV and convert back to JSON using this tool's CSV → JSON mode.
Frequently Asked Questions
What JSON format is supported for JSON → CSV conversion?
- The tool expects a JSON array of objects, where each object represents a row and its keys become the column headers. For example: [{"name":"Alice","age":30},{"name":"Bob","age":25}]. Nested objects are flattened using dot notation (e.g., address.city) when the flatten option is enabled.
Can I convert CSV files with different delimiters?
- Yes. The tool supports comma (,), semicolon (;), and tab (\t) delimiters. Select the matching delimiter before pasting your CSV data. Semicolon-delimited files are common in European locales where commas are used as decimal separators.
Does the tool handle quoted fields with commas inside?
- Yes. The CSV parser correctly handles RFC 4180 quoting — fields containing commas, newlines, or double quotes are wrapped in double quotes, and internal double quotes are escaped as "". For example: "Smith, John",30 is parsed as a single field.
What happens to missing fields in JSON → CSV?
- The tool collects all unique keys across all objects in the array as column headers. If an object is missing a key that others have, that cell is left empty in the CSV output.
Is there a size limit for conversions?
- There is no hard limit — the tool runs entirely in your browser. However, very large files (10MB+) may take a moment to process. All processing is local; no data is uploaded.
Related Tools
JSON Formatter
Clean, minify, and validate JSON data structures.
YAML Formatter
Format and validate YAML. Convert YAML to JSON or JSON to YAML. Supports 2 and 4 space indentation.
XML Formatter
Format, minify, and validate XML. Convert XML to JSON with one click. Supports custom indent sizes.
Base64
Encode and decode Base64 strings instantly.
CSV to XLSX Converter
Convert CSV files to Excel XLSX format. Auto-detect delimiters, infer column types, add header formatting. Batch support. Free, browser-based, no upload.