JSON to CSV Converter – Convert JSON to CSV Online Free
Transform JSON arrays, nested objects, and JSONLines (NDJSON) into Excel-compatible CSV files. Customize delimiters, automatically flatten hierarchies, preview tables live, and download with UTF-8 BOM encoding.
Drag & drop JSON file here or click to browse
Supports.json, .jsonl, .ndjson, and .txt (Max 20MB)Conversion Settings & Format Options
Convert JSON to preview the structured data grid.
Conversion Metrics
Standard ArrayA JSON to CSV converter is a specialized data transformation tool that turns hierarchical JSON (JavaScript Object Notation) key-value objects and arrays into flat, 2-dimensional Comma-Separated Values (CSV) spreadsheets. It enables seamless data migration into Microsoft Excel, Google Sheets, SQL databases, and business intelligence platforms.
user.contact.city).\uFEFF Byte Order Mark so symbols (₹, €) display properly.What is JSON to CSV Conversion and Why Do You Need It?
Direct Answer: JSON to CSV conversion transforms hierarchical key-value JSON trees into flat, rectangular 2D tables composed of rows and columns. Top-level objects in a JSON array become rows in the CSV spreadsheet, while object keys become column headers separated by commas, semicolons, or tabs.
Our free online JSON to CSV converter transforms structured JSON documents, API payloads, nested object arrays, and streaming JSONLines (NDJSON) files into standardized Comma-Separated Values (CSV) format. Whether you need to import REST API responses into Microsoft Excel, Google Sheets, LibreOffice Calc, PostgreSQL, Snowflake, or business intelligence suites like Tableau and Power BI, this tool streamlines data normalization in seconds.
JSON (JavaScript Object Notation) is the universal data format for modern web APIs, NoSQL databases (MongoDB, DynamoDB, CouchDB), and cloud applications. However, business analytics, financial reporting, tabular machine learning pipelines, and spreadsheet applications require strict rectangular 2D data grids. OperateTools bridges that gap by auto-detecting schema structures, flattening nested object hierarchies into dot-notation headers, handling inconsistent keys, and formatting RFC 4180-compliant CSV with full UTF-8 BOM encoding for seamless Excel compatibility.
Why Convert JSON to CSV? (Real-World Use Cases)
Direct Answer: Converting JSON to CSV is essential when transitioning from programmatic API streams to tabular analysis tools, relational databases, spreadsheet software, and marketing automation platforms.
Developers, data analysts, and digital marketers frequently convert JSON payloads into CSV for several mission-critical workflows:
Transform raw REST and GraphQL API responses into clean spreadsheets for accounting, inventory tracking, and managerial audits.
Import live API metrics and webhook dumps directly into Google Sheets and LibreOffice Calc for collaborative dashboards.
Prepare bulk data for high-speed database ingestion using PostgreSQL COPY, MySQL LOAD DATA INFILE, Snowflake, or BigQuery.
Convert application customer lists into standardized CSV files formatted for HubSpot, Salesforce, Klaviyo, and Mailchimp.
Flatten nested product or telemetry data into 2D columnar datasets ready for immediate visualization in Tableau or Power BI.
Deliver structured application exports to stakeholders, financial officers, and legal auditors who cannot parse raw JSON code.
JSON to CSV Example (Visual Walkthrough)
Direct Answer: In a standard JSON to CSV transformation, each top-level object in the JSON array becomes an individual row, object keys define the CSV column headers, and individual property values become the cells.
The visual walkthrough below illustrates how a straightforward array of JSON user objects is parsed and converted into a standard CSV table:
[
{
"id": 1,
"name": "Alice",
"email": "alice@example.com"
},
{
"id": 2,
"name": "Bob",
"email": "bob@example.com"
}
]id,name,email
1,Alice,alice@example.com
2,Bob,bob@example.comHow the Parser Maps the Data:
- JSON Array → Table Rows: Each independent object (
{ "id": 1, ... }) represents a distinct record (row) in the output CSV. - JSON Keys → Column Headers: The attributes
id,name, andemailare extracted to create the first header row. - Property Values → CSV Cells: Primitive values (
1,"Alice","alice@example.com") are placed in their respective column positions, separated by delimiters.
RFC 4180 CSV Formatting & Compliance
Direct Answer: OperateTools generates strict RFC 4180-compliant CSV files. This ensures that fields containing embedded commas, double quotes, or newlines are properly escaped with double quotes ("...") and internal quotes are doubled ("").
The Internet Engineering Task Force (IETF) defined RFC 4180 as the formal standard specification for Common Format and MIME Type for Comma-Separated Values (CSV) Files. Our converter strictly adheres to all RFC 4180 formatting rules:
| RFC 4180 Rule | JSON Input Scenario | Formatted CSV Output | Compliance Explanation |
|---|---|---|---|
| Comma-Separated Fields | {"city": "Kolkata", "state": "WB"} | Kolkata,WB | Fields on the same row are separated by a single delimiter character (comma by default). |
| Embedded Commas | {"address": "Park Street, Kolkata"} | "Park Street, Kolkata" | Fields containing delimiters are enclosed in double quotes so the parser doesn't split the cell into two columns. |
| Embedded Double Quotes | {"quote": "He said \"Hello\""} | "He said ""Hello""" | Internal double quotes are escaped by prefixing another double quote (""), and the entire field is wrapped in quotes. |
| Embedded Line Breaks | {"notes": "Line 1\nLine 2"} | "Line 1 | Fields containing CRLF (\r\n) or LF (\n) newlines are enclosed in double quotes, preserving multiline cell text. |
| Record Terminations | All rows across all datasets | Row 1\nRow 2 | Each record is placed on a separate line terminated by standard line endings. |
What Happens When JSON Objects Have Different Keys? (Sparse & Inconsistent Schemas)
Direct Answer: When JSON objects contain different or missing fields, OperateTools performs a union key extraction pass across all records. Any missing properties in a specific object are populated as empty cells without throwing errors or misaligning columns.
In modern NoSQL databases (MongoDB, CouchDB) and dynamic REST APIs, objects frequently have inconsistent or evolving schemas where some records contain optional fields while others do not:
[
{
"id": 1,
"name": "Alice"
},
{
"id": 2,
"name": "Bob",
"email": "bob@example.com"
}
]id,name,email
1,Alice,
2,Bob,bob@example.comBecause Record 1 lacks the email attribute, the converter outputs an empty value between the commas (1,Alice,). This guarantees that every column remains perfectly aligned across every row in your spreadsheet.
How Nested JSON Is Converted to CSV
Direct Answer: CSV is a flat 2D tabular format that cannot natively store hierarchical trees. OperateTools solves this by offering Auto-Flatten Nested Objects (which generates dot-notated column headers like address.city) or stringifying nested objects into RFC 4180-escaped JSON strings.
When converting objects that contain inner child objects, you can choose between two transformation strategies:
[
{
"id": 1,
"name": "Alice",
"address": {
"city": "Kolkata",
"country": "India"
}
}
]id,name,address.city,address.country
1,Alice,Kolkata,IndiaWith Auto-Flatten Nested Objects checked, child properties are unnested into individual spreadsheet columns.
id,name,address
1,Alice,"{""city"":""Kolkata"",""country"":""India""}"Without flattening, the inner object is serialized into an escaped JSON string within the address cell.
How Are JSON Arrays Inside Objects Handled?
Direct Answer: Primitive arrays (strings, numbers) inside an object are joined into clean semicolon-separated strings (e.g. "PHP; Laravel; MySQL") so each JSON object stays on a single CSV line. Complex arrays of objects are safely stringified.
[
{
"name": "Alice",
"skills": ["PHP", "Laravel", "MySQL"]
}
]name,skills
Alice,PHP; Laravel; MySQLIf you prefer to keep array values inside brackets, you can preserve JSON format (Alice,"[""PHP"",""Laravel"",""MySQL""]") or use the semicolon delimiter to easily split cells into separate columns in Excel using the Data > Text to Columns wizard.
How to Convert a Single JSON Object vs. an Array of Objects?
Direct Answer: If your input is an array of objects [{...}, {...}], each object produces a distinct row. If you input a single root object {...}, the converter automatically wraps it into a single-row CSV table with headers corresponding to the object's keys.
[{"id": 1, "name": "Alice"}, {"id": 2, "name": "Bob"}]
Produces a multi-row CSV table where each array item becomes an independent data record.
{"name": "Alice", "age": 30, "city": "Kolkata"}
Produces a single-row CSV output with column headers name,age,city and row values Alice,30,Kolkata.
Can You Convert a JSON Array of Arrays to CSV?
Direct Answer: Yes. If your JSON consists of an array of arrays (e.g. [["Alice", 30, "Kolkata"], ["Bob", 25, "Delhi"]]), each inner array represents a row tuple. The converter maps each inner array element directly to CSV columns, with optional auto-generated headers (col1, col2, col3) or headerless CSV export.
Convert Nested JSON Arrays Using Array Path (Unique Feature)
Direct Answer: REST APIs often wrap data arrays inside metadata envelopes (e.g. {"status": "success", "data": {"users": [...]}}). Enter the target key path (e.g. data.users) in the Target Array Path box to drill down and convert only the desired records.
{
"status": "success",
"metadata": { "page": 1, "total": 200 },
"data": {
"users": [
{ "id": 1, "name": "Alice" },
{ "id": 2, "name": "Bob" }
]
}
}data.usersid,name
1,Alice
2,BobOur Array Path engine supports nested dot notation (response.data.items) and array index brackets (results[0].rows), allowing you to extract data from complex third-party APIs (Stripe, Shopify, GitHub, Salesforce) without manual cleanup.
JSONLines (NDJSON) to CSV Conversion
Direct Answer: JSONLines (NDJSON / .jsonl) files contain one independent JSON record per line without wrapping brackets or commas. OperateTools auto-detects NDJSON streams and parses each line directly into tabular CSV rows.
{"id": 1, "name": "Alice"}
{"id": 2, "name": "Bob"}
{"id": 3, "name": "Charlie"}id,name
1,Alice
2,Bob
3,CharlieNDJSON is widely used by cloud logging platforms (Elasticsearch, AWS CloudWatch, Datadog), big data pipelines (Apache Spark, Kafka), and streaming OpenAI / Anthropic batch API exports. Our parser handles both standard JSON and NDJSON seamlessly.
Convert JSON to CSV for Excel (Microsoft Excel, Google Sheets, LibreOffice)
Direct Answer: To ensure maximum compatibility across Microsoft Excel, Google Sheets, and LibreOffice Calc, OperateTools provides customizable delimiters (comma vs. semicolon for European locales) and automatically includes a UTF-8 BOM header.
- European Excel Locales: In European countries (Germany, France, Spain, Italy, Brazil) where a comma is used as the decimal point (e.g.
12,50 €), Excel uses a semicolon (;) as the list separator. Select ; Semicolon in our delimiter dropdown to prevent Excel from putting the entire row into column A. - Standard English Locales: In the US, UK, Canada, Australia, and India, select , Comma delimiter.
- Google Sheets & LibreOffice: Both Google Sheets and LibreOffice automatically detect delimiters and UTF-8 encoding seamlessly.
- Formula Injection Protection: When opening CSV files from untrusted API sources in Excel, cell values starting with
=,+,-, or@can trigger Excel formulas. Our converter wraps strings safely to maintain data integrity.
JSON to CSV Encoding and UTF-8 / Unicode / BOM
Direct Answer: OperateTools fully supports UTF-8 Unicode characters—including Bengali (বাংলা), Hindi (हिन्दी), Chinese (中文), Japanese (日本語), Cyrillic, emoji (🚀), and accented characters (é, ö, ü). All downloaded CSV files automatically include a UTF-8 Byte Order Mark (BOM: \uFEFF) to guarantee perfect rendering in Excel.
[
{
"name": "Tanmoy",
"city": "Kolkata",
"language": "বাংলা",
"symbol": "₹"
}
]name,city,language,symbol
Tanmoy,Kolkata,বাংলা,₹Without a UTF-8 BOM, legacy versions of Microsoft Excel default to the Windows ANSI codepage (Windows-1252), causing non-ASCII characters to appear as corrupted mojibake (such as é instead of é). By attaching the \uFEFF byte sequence, Excel is forced to decode the file as UTF-8 on launch.
JSON vs. CSV: What's the Difference?
Direct Answer: JSON is a hierarchical, typed data format ideal for APIs, web services, and nested objects. CSV is a flat, lightweight 2D tabular format designed for spreadsheets, relational databases, and high-throughput bulk imports.
| Feature / Dimension | JSON (JavaScript Object Notation) | CSV (Comma-Separated Values) |
|---|---|---|
| Data Structure | Hierarchical trees, nested objects, and arrays | Flat 2D rectangular grid (rows & columns) |
| Native Data Types | String, Number, Boolean, Null, Array, Object | Plain text (strings only; typing inferred by consumer) |
| Spreadsheet Friendly | Requires plugins or Power Query parsing | Native one-click opening in Excel, Sheets, Calc |
| API & Web Standard | Universal standard for REST & GraphQL APIs | Commonly used for file export and batch imports |
| File Size Overhead | Repeats key names on every record (heavier) | Header row declared once (ultra-compact, lean) |
| Database Ingestion | Supported in NoSQL (MongoDB) and JSONB columns | Fastest bulk ingestion (PostgreSQL COPY, MySQL LOAD DATA) |
How Data Types Change When Converting JSON to CSV
Direct Answer: Because CSV stores plain text, native JSON data types undergo standardized transformations: strings and numbers are preserved as text literals, booleans become true/false, null values become empty cells, and nested objects/arrays are flattened or serialized.
| JSON Data Type | JSON Example | Converted CSV Output | Transformation Behavior |
|---|---|---|---|
| String | "name": "Alice" | Alice | Preserved directly. Quoted if containing delimiters or line breaks. |
| Number (Integer / Float) | "score": 98.5 | 98.5 | Rendered as standard numeric text literal. |
| Boolean | "active": true | true | Converted to lowercase string literals (true or false). |
| Null / Undefined | "discount": null | (empty string) | Rendered as an empty cell (,,) to represent missing values. |
| Primitive Array | "tags": ["PHP", "SQL"] | PHP; SQL | Joined into a clean semicolon-separated string value. |
| Nested Object | "meta": {"v": 1} | meta.v: 1 (or serialized) | Flattened into dot-notation column or serialized as JSON string. |
How Do You Convert Large JSON Files Exceeding 100MB to CSV?
Direct Answer: For files under 20MB (up to ~150,000 rows), in-browser conversion takes less than 2 seconds. For massive multi-gigabyte datasets (500MB to 10GB+), streaming CLI tools like jq or Python Pandas with chunksize should be used to prevent browser memory limits.
Web browsers enforce heap memory limits (typically 1GB–2GB per browser tab). When converting huge database dumps or historical log archives, processing records in streaming chunks prevents memory exhaustion.
How Do You Convert JSON to CSV Programmatically (Python, JavaScript, PHP, jq)?
Direct Answer: You can convert JSON to CSV programmatically using Python (pandas.json_normalize), Node.js (fs + map), PHP (fputcsv), or command-line jq.
1. Python (Pandas & json module)
2. JavaScript / Node.js
3. PHP
4. Command Line CLI (jq)
How Do You Troubleshoot Common JSON Parsing and Conversion Errors?
Direct Answer: Common conversion errors are caused by syntax flaws (trailing commas, single quotes), unextracted wrapper objects, regional delimiter mismatches in Excel, or unescaped inner quotes.
- Invalid JSON Syntax / Trailing Commas: Strict JSON disallows trailing commas (e.g.
{"name": "Alice",}). Remove trailing commas or format the JSON first with our JSON Beautifier. - Array Wrapped in Object Root: If your JSON payload is structured as
{"status": 200, "data": [...]}, enterdatain the Target Array Path input box. - European Semicolon Delimiter: If Excel places all columns into a single cell, switch the delimiter from comma to ; Semicolon before downloading.
- Deep Object Flattening: If nested properties are appearing as raw JSON strings, verify that Auto-Flatten Nested Objects is enabled.
Is Your JSON Data Safe and Secure When Converting Online? (Privacy Architecture)
Direct Answer: Yes. Our JSON to CSV converter executes 100% locally in your web browser using client-side JavaScript. When pasting or uploading JSON files, zero data is uploaded, stored, or sent to our servers. URL imports are fetched directly by your browser or securely processed without logging payloads.
- Paste & File Upload: Conversions execute entirely client-side in your browser using high-performance JavaScript engines. Your proprietary customer lists, API credentials, financial records, and confidential data never leave your device.
- Remote URL Fetching: When fetching a remote JSON URL, the request is executed directly from your browser (or via a secure TLS pass-through) without recording or storing your payloads on our servers.
- Zero Tracking or Storage: We do not store, inspect, train AI models on, or transmit your data to third parties.
Frequently Asked Questions About Converting JSON to CSV
Is this JSON to CSV converter RFC 4180 compliant?
Yes. Our converter strictly follows RFC 4180 rules. Fields containing commas, semicolons, line breaks, or double quotes are automatically enclosed in quotes, and internal quotes are escaped by doubling them ("").
Can I convert nested JSON objects into flat CSV columns?
Yes. With the "Auto-Flatten Nested Objects" setting enabled, child objects (e.g. {"address": {"city": "Kolkata"}}) are recursively flattened into dedicated dot-notation column headers like address.city.
What happens if JSON objects in my array have different or missing keys?
Our parser performs a superset key extraction pass across all records. Any missing attributes in individual objects are populated with empty cells (,,), ensuring columns never misalign.
How do I extract a nested array from an API response envelope?
Enter the dot-notated array key path (e.g. data.users or results[0].items) in the Target Array Path box to isolate and export the record list.
What is JSONLines (NDJSON) and does this tool support it?
JSONLines (Newline Delimited JSON) stores each record on a separate line without wrapping brackets or commas. Our tool automatically detects NDJSON line streams and parses them directly into tabular CSV.
Why does Microsoft Excel show garbled characters from CSV files?
Excel assumes legacy ANSI encoding unless a UTF-8 Byte Order Mark (BOM: \uFEFF) is present. Our tool automatically attaches the UTF-8 BOM so currency symbols (₹, €) and international scripts display properly.
Why do European versions of Microsoft Excel require a semicolon (;) delimiter?
In European locales where the comma is used as a decimal separator (e.g. 10,50 €), Excel expects a semicolon (;) as the column separator. Select the ; Semicolon option in our delimiter dropdown.
Can I convert a single JSON object (not in an array) into CSV?
Yes. If you paste a single root JSON object (e.g. {"id": 1, "name": "Alice"}), the tool automatically wraps it into a single-row CSV output with corresponding column headers.
How are arrays of strings or numbers inside individual objects handled?
Primitive arrays (such as ["PHP", "Laravel"]) are joined into clean semicolon-separated strings (PHP; Laravel) so each JSON record occupies exactly one row.
Can I convert a JSON array of arrays into CSV?
Yes. Matrix arrays like [["Alice", 30], ["Bob", 25]] are mapped directly to tabular rows, with auto-generated headers (col1, col2) or headerless CSV export.
How does the converter handle null, boolean, and numeric JSON values?
Booleans become true or false strings, numbers remain numeric literals, and null or undefined values become clean empty cells.
How do I convert massive JSON files larger than 100MB?
Our in-browser converter comfortably processes files up to 20MB (over 150,000 rows). For multi-gigabyte datasets, streaming CLI tools like jq or Python Pandas chunking are recommended to avoid memory overflow.
Is my confidential JSON data uploaded or stored on your servers?
No. All JSON to CSV conversion occurs 100% locally in your web browser. Your confidential data is never uploaded, stored, logged, or transmitted across remote servers.
What is the difference between JSON to CSV and JSON to Excel (.xlsx)?
CSV is a universal plain-text format compatible with every spreadsheet and SQL database. Excel (.xlsx) is a binary zipped XML container that supports formulas, cell styling, and multiple sheets.
Can I convert CSV back into JSON format?
Yes. Use our companion CSV to JSON Converter to transform CSV and TSV spreadsheets back into JSON arrays and nested structures.