JSON to CSV Converter

Convert JSON arrays, nested API responses, and newline-delimited JSON (NDJSON) into clean, RFC 4180-compliant CSV or TSV files in real time. Configure custom delimiters, unroll nested object properties with dot notation, handle arrays, and export directly to Microsoft Excel with UTF-8 byte-order marks. All processing happens entirely inside your browser—no data is ever sent to a server.

Free browser tool · 100% private & client-side

Convert JSON to CSV

Transform JSON objects, nested API payloads, and NDJSON streams into clean, RFC 4180-compliant CSV or TSV spreadsheets with customizable delimiters and Excel UTF-8 support.

  • RFC 4180 & Excel safe
  • Deep nested flattening
  • NDJSON & arrays support
  • 100% Client-side & private

Paste or upload JSON

Supports standard JSON arrays, single objects, wrapped API responses (e.g. {"data": [...]}), and NDJSON streams.

Conversion summary

Paste JSON or load a sample on the left to inspect rows, schema health, and export CSV.

Data inspection & schema notes

Preview & export

Table preview will appear here once valid JSON is entered.

What is a JSON to CSV converter?

A JSON to CSV converter transforms structured, hierarchical JavaScript Object Notation (JSON) payloads into two-dimensional, Comma-Separated Values (CSV) spreadsheets. While JSON is the universal lingua franca for modern web APIs, serverless microservices, NoSQL databases, and application logging, tabular spreadsheets remain the dominant interface for business operators, data analysts, finance departments, and revenue operations teams.

JSON represents information as nested key-value pairs, associative dictionaries, and multidimensional arrays. In contrast, CSV represents data as flat rows and columns separated by delimiters (such as commas, semicolons, or tabs) and line breaks. Converting between these two paradigms requires intelligent flattening of nested object trees, consistent alignment of sparse fields, careful quoting according to the RFC 4180 specification, and protective encoding against spreadsheet formula vulnerabilities.

Crucially, this tool operates entirely on the client side inside your web browser via standard ECMAScript APIs. Unlike typical cloud-hosted conversion websites that upload your payloads to external servers, this converter never transmits your data across the internet. Sensitive API logs, customer contact lists, payment records, and confidential business metrics remain private on your local machine.

How to convert JSON to CSV in 5 steps

  1. Paste your JSON payload or upload a file: Paste any valid JSON array, single object, API wrapper dictionary (e.g. {"data": [...]}), or newline-delimited JSON (NDJSON) into the source area, or click Upload .json to load a file from disk.
  2. Choose your column delimiter: Select Comma (,) for standard international CSV, Semicolon (;) for European Excel environments where the comma denotes a decimal separator, or Tab (\t) for TSV databases.
  3. Configure nested flattening and array formatting: Keep Flatten nested objects enabled to automatically unroll nested properties into dot-notation headers (such as user.address.city). Choose whether arrays serialize as clean semicolon-separated values or raw JSON strings.
  4. Inspect schema health and table preview: Review the live conversion summary, column count, data density percentage, and the first rows in the Table preview panel.
  5. Copy or download your spreadsheet: Click Copy CSV to place the formatted text directly on your system clipboard, or click Download .csv to generate an immediate file export with an optional UTF-8 Byte Order Mark for Microsoft Excel.

Understanding RFC 4180 CSV compliance & escaping

The formal standard for CSV files is codified in Internet Engineering Task Force (IETF) RFC 4180. Despite CSV being one of the oldest computing formats, improperly escaped CSV files frequently crash database loaders, corrupt CRM imports, or offset table columns. This converter rigorously applies all RFC 4180 rules:

RFC 4180 Rule Standard Requirement Converter Implementation
Delimiters in Values Any field containing the active delimiter (such as a comma in standard CSV) must be wrapped in double quotes. Automatically detects commas within addresses, names, or sentences and wraps the cell: "Austin, TX".
Embedded Double Quotes Double quotes inside a cell must be escaped by prefixing them with another double quote (""). Escapes internal quotes seamlessly: a JSON value of He said "hello" becomes "He said ""hello""" in the CSV output.
Line Breaks (Newlines) Fields containing line feeds (\n) or carriage returns (\r) must be enclosed in double quotes. Preserves multi-line text strings inside single quoted spreadsheet cells without splitting table rows.
Record Endings Each record should be terminated with a CRLF sequence (\r\n). Outputs standard Windows/RFC CRLF line terminators to ensure universal parsing across Excel, Google Sheets, and PostgreSQL.
Leading / Trailing Whitespace Cells with significant leading or trailing spaces should be quoted to prevent truncation. Auto-quotes values with boundary whitespace so formatting remains intact across spreadsheet applications.

How nested object flattening works with dot notation

Real-world REST APIs and document databases rarely return flat objects. Instead, they nest related entities inside sub-objects. For example, consider an e-commerce order payload:

{
  "order_id": "ORD-9481",
  "customer": {
    "name": "David Miller",
    "email": "[email protected]"
  },
  "shipping": {
    "address": {
      "city": "Austin",
      "postal_code": "78701"
    }
  }
}

Spreadsheet applications have no native concept of nested records; every cell must belong to an intersection of a single row and column. When Flatten nested objects is enabled, this tool recursively navigates the object tree, concatenating parent and child keys using dot notation:

order_id customer.name customer.email shipping.address.city shipping.address.postal_code
ORD-9481 David Miller [email protected] Austin 78701

If you prefer to preserve raw nested structures for database ingest or programmatic scripts, uncheck the flattening option. The converter will serialize nested objects as JSON strings (such as "{""city"":""Austin""}""") inside the corresponding table cells.

Handling sparse JSON datasets without misalignment

A common failure point in rudimentary JSON to CSV tools is inspecting only the first record to generate column headers. If record #1 has { "id": 1, "name": "Alice" } and record #2 has { "id": 2, "name": "Bob", "phone": "555-0199" }, naive converters silently drop the phone column for all rows.

This engine performs a complete schema union pass across all records in your dataset. It registers every unique property key in stable order of appearance, ensuring that no attributes are lost. When an individual record lacks a specific property, an empty string is cleanly placed in that cell. The live conversion summary displays the resulting Data completeness percentage, alerting you if records have uneven numbers of attributes.

Array formatting: Delimited values vs JSON strings

JSON frequently stores multiple items in lists, such as contact tags (["enterprise", "inbound", "q4"]), user permission roles, or product categories. This tool offers four configurable strategies for serializing arrays inside CSV cells:

  • Semicolon list (default): Joins items into a readable string: enterprise; inbound; q4. This is the gold standard for importing into CRM platforms like HubSpot, Salesforce, and ActiveCampaign, which recognize semicolons as multi-select picklist delimiters.
  • Raw JSON string: Retains strict JSON array syntax: ["enterprise","inbound","q4"]. Recommended when exporting data destined for SQL databases (such as PostgreSQL jsonb columns) or BigQuery.
  • Pipe list: Joins values using pipe symbols: enterprise | inbound | q4. Ideal when cell values themselves contain commas or semicolons.
  • Comma list: Joins values with commas: "enterprise, inbound, q4". Automatically quoted so spreadsheet parsers do not mistake the items for separate table columns.

Delimiter comparison: Comma, semicolon, tab, and pipe

The optimal delimiter depends on your geographic locale, software versions, and data values. Review the differences below:

Delimiter Standard Extension Primary Use Case & Region Key Advantages & Considerations
Comma ( , ) .csv North America, United Kingdom, Australia, East Asia. Standard for Google Sheets, Salesforce, HubSpot. Universal default. Requires double-quoting whenever text contains natural commas.
Semicolon ( ; ) .csv Continental Europe (Germany, France, Netherlands, Italy, Spain) and South America. Crucial for European Microsoft Excel, where the comma is reserved as the decimal separator (e.g. 12,50 €). Prevents numbers from splitting into separate columns.
Tab ( \t ) .tsv Data science, bioinformatics, natural language processing, Unix CLI pipelines. Tabs rarely appear in human text, reducing the need for quote escaping and decreasing file size.
Pipe ( | ) .csv / .txt Enterprise data warehouses, legacy ERP systems, mainframe migrations. Provides high visual contrast and zero ambiguity in free-form narrative text datasets.

Preventing CSV injection (formula injection) in Excel & Google Sheets

CSV files are fundamentally plain text, but desktop spreadsheet software (including Microsoft Excel, LibreOffice Calc, and Google Sheets) will automatically evaluate cells as executable formulas if the first character is an equals sign (=), plus sign (+), minus sign (-), or at-symbol (@). This behavior creates a security vulnerability known as CSV Injection or Formula Injection (CWE-1236).

If an untrusted user inputs text such as =cmd|' /C calc'!A0 or =HYPERLINK("http://malicious.com", "Claim Reward") into an application form or database, exporting that unvetted record to CSV can trigger unauthorized command execution or data exfiltration when opened by an administrator.

This converter scans every cell in your input. If any string begins with a formula trigger character, the tool highlights the risk in the Data inspection & schema notes panel and ensures the cell is enclosed in strict RFC double quotes. When handling untrusted external data, you should always inspect formula warnings before sharing spreadsheets with colleagues.

Worked conversion examples

Input JSON Scenario Selected Settings Resulting CSV Output Row Target Application Benefit
B2B Contact Record
{"name": "Sarah Chen", "tags": ["sales", "lead"]}
Comma delimiter,
Semicolon arrays
name,tags
"Sarah Chen",sales; lead
Imports cleanly into Salesforce or HubSpot multi-select picklists.
European Financial Metric
{"item": "Subscription", "cost": "49,95"}
Semicolon delimiter,
Auto-quotes
item;cost
Subscription;"49,95"
Opens directly in German/French Excel without breaking decimal points.
Nested User Address
{"user": "Alex", "loc": {"city": "Paris"}}
Flatten enabled,
Comma delimiter
user,loc.city
Alex,Paris
Unrolls deep API responses into actionable spreadsheet columns.
NDJSON Server Log
{"event": "login", "code": 200}
Tab delimiter,
Header included
event code
login 200
Formats log streams for rapid Unix command-line analysis via awk or cut.

Browser memory, security, and technical limitations

Because this converter runs entirely in your client web browser without server-side compute:

  • Memory boundaries: Modern JavaScript engines (such as V8 in Chrome and Edge) comfortably handle JSON strings up to 50–100 megabytes (typically representing 100,000 to 500,000 tabular rows). For multi-gigabyte database dumps, consider stream processing with command-line utilities such as jq or Python scripts.
  • Circular references: JSON standards forbid circular structures (objects referencing themselves). The browser parser will throw a syntax error if self-referential trees are encountered.
  • Maximum nesting depth: The recursive flattening engine traverses nested objects up to 20 levels deep, easily accommodating even the most complex enterprise API schemas.
  • Data confidentiality: No tracking cookies, external analytics beacons, or server uploads are executed. Your confidential data never leaves your device memory.

Frequently asked questions (FAQs)

Why does Microsoft Excel show garbled characters for accents or non-English text?

By default, desktop Microsoft Excel opens CSV files using the legacy Windows ANSI code page rather than UTF-8. When special characters (such as accented letters é, ü, ñ, or Chinese/Arabic characters) are opened, Excel misinterprets the multi-byte sequences. This tool includes a UTF-8 BOM (Byte Order Mark) option that prepends the standard byte signature (\uFEFF) to the file export. This instructs Excel to immediately open the document in UTF-8 mode with crystal-clear typography.

Can this tool convert newline-delimited JSON (NDJSON / JSON Lines)?

Yes. Many cloud services, AWS CloudWatch log streams, and BigQuery exports use NDJSON (where each line is a separate, valid JSON object). If standard JSON array parsing encounters line-delimited objects, this tool automatically detects the NDJSON structure, parses each record sequentially, merges all keys into a unified table, and displays an NDJSON notification badge.

How does the tool handle single JSON objects versus arrays?

If you paste a single JSON object (e.g. {"id": 1, "name": "Admin"}), the tool automatically converts it into a clean one-row CSV table with corresponding headers. Furthermore, if your JSON wraps an array inside a common API envelope (such as {"status": 200, "data": [...]}), the engine detects the nested array and extracts the underlying records automatically.

Will my data ever be transmitted to an external server or stored in cookies?

Never. The conversion logic runs 100% locally inside your browser session using standard JavaScript DOM and Blob APIs. There are no server-side endpoints, no telemetry trackers, no cookies, and no third-party CDNs. When you close or refresh the browser tab, the data disappears completely from memory.

What happens when some JSON objects are missing certain keys?

The converter compiles an exhaustive union of all keys present across every object in your dataset. If an object lacks a key that exists elsewhere in the dataset, the converter places an empty value ("") in that specific column for that row. This guarantees that columns never shift or become misaligned across different rows.

Can I export as a Tab-Separated Values (TSV) file instead of CSV?

Yes. Select Tab (\t) from the Delimiter dropdown. The table preview and file exporter will instantly switch to TSV formatting, allowing you to copy or download clean tab-separated files ideal for pasting directly into Google Sheets or database tables.

Why are my array values separated by semicolons rather than commas?

In tabular data, separating array values with commas inside a comma-delimited file can cause confusion or require aggressive quoting. Semicolons are the standard delimiter recognized by major CRM platforms (like Salesforce and HubSpot) for multi-select fields. You can easily switch this setting to Raw JSON string, Pipe list, or Comma list in the options panel.

How do I automate data enrichment and prospecting workflows?

If you are regularly working with bulk lead exports, scraped contact tables, or API data dumps, pair this tool with our free Lead List Deduplicator and Bulk Domain Cleaner. For end-to-end outbound infrastructure, lead verification, and custom enrichment pipelines, explore our tailored B2B lead generation & data enrichment services.