How to use JSON ↔ CSV
- 1
Paste your JSON array or CSV data into the Input panel.
- 2
Output is generated automatically.
- 3
Use "Swap Direction" to toggle between CSV→JSON and JSON→CSV.
- 4
Download the result as .json or .csv.
Convert JSON arrays to CSV tables and back. Both directions supported with RFC-4180-compliant parsing.
Paste your JSON array or CSV data into the Input panel.
Output is generated automatically.
Use "Swap Direction" to toggle between CSV→JSON and JSON→CSV.
Download the result as .json or .csv.
Flat JSON objects only. Nested objects need to be flattened before conversion.
Yes, the parser is RFC-4180 compliant and handles quoted fields containing commas and newlines.
JSON and CSV are the two most widely used data interchange formats in the world of software, data science, and business analytics. JSON is the dominant format for REST API responses, configuration files, and NoSQL database exports. CSV is the universal standard for spreadsheets, database imports, and data science pipelines. Every developer and data analyst routinely needs to move data between these two formats.
The ToolsHubs JSON ↔ CSV Converter supports both directions — JSON-to-CSV and CSV-to-JSON — in a single tool, with real-time conversion and an RFC-4180-compliant CSV parser that correctly handles quoted fields, embedded commas, and embedded newlines. All processing is done in your browser.
CSV → JSON: The parser implements RFC-4180, the standard that defines CSV (Comma-Separated Values) format. It handles: double-quoted fields ("field"), quoted fields containing commas ("field,with,commas"), escaped double quotes ("field with ""inner"" quotes"), and multi-line values within quotes. The header row (first line) is used as JSON keys. Each subsequent line becomes one object in the output JSON array. Example:
Input CSV:
name,age,city
Alice,30,"New York"
Bob,25,London
Output JSON:
[{"name":"Alice","age":"30","city":"New York"},{"name":"Bob","age":"25","city":"London"}]
JSON → CSV: The first object in the array determines the column structure (keys = headers). All subsequent objects are expected to share the same key structure. Values containing commas, newlines, or double-quotes are automatically wrapped in quotes and escaped according to the RFC-4180 standard.
Note: all values in CSV output are treated as strings. Type information (number, boolean, null) from JSON is preserved in the raw text but is not enforced. Library consumers (Excel, Python pandas) will infer types during their own parsing pass.
Backend Developers: API responses in JSON need to be converted to CSV for delivery to non-technical stakeholders who use Excel. This tool eliminates the need for a dedicated script or library.
Data Analysts: Download data exports from APIs in JSON format and convert them to CSV for opening in Excel, Google Sheets, or for loading into Python with pandas.read_csv().
Database Administrators: Many databases export in CSV and accept imports in CSV. But some ORMs and query builders return JSON. This tool bridges the gap when migrating data between systems.
QA Engineers: When comparing expected vs actual API output, convert both JSON responses to CSV and use a diff tool to spot discrepancies in tabular data.
Ensure your JSON input is a flat array of objects. Deeply nested JSON ({"user":{"address":{"city":"London"}}}) cannot be directly converted to a 2D CSV table — you need to flatten it first. Use the JSON Formatter tool to inspect the structure before conversion.
For large datasets, the tool processes the entire input as a string in memory before generating output. For files larger than ~50 MB, performance may degrade in the browser — in those cases, use a command-line tool like jq or Python's csv module.
After converting CSV → JSON, the result should always be validated against your expected schema. CSV provides no type information — dates, numbers, and booleans all come out as strings and may need post-processing.
The most common mistake is passing nested JSON. The converter expects a flat array like [{...}, {...}, {...}]. Objects like {"data": [...]} need to be unwrapped first — simply paste the inner array value into the input.
The tool uses the first object's keys to determine CSV column order. If later objects in the array have additional or fewer keys, those values will either be missing from the CSV or the columns will be misaligned. Ensure all objects in your JSON array share a consistent key set.
CSV has no concept of null — a null JSON value will appear as the literal string null in the CSV output. Adjust accordingly in your downstream processing.
Your data never leaves this device. All processing is handled locally by JavaScript.
Convert between JSON arrays and CSV tables. Both directions supported.