Skip to content

JSON to CSV

JSON to CSV Converter

Paste or upload JSON and get a clean CSV — nested objects flatten to columns, arrays are handled. Nothing is uploaded.

  • Runs in your browser
  • Nothing uploaded
  • No sign-up
  • Free, no daily limits
  1. 1Add your file
  2. 2Choose settings
  3. 3Download
Delimiter
JSON input
CSV output

100% Private: Your JSON is converted entirely in your browser — nothing is uploaded to any server.

Convert JSON to CSV Online Free

JSON to CSV is a free in-browser converter that flattens JSON arrays into clean comma-separated values without uploading data to external servers. Paste JSON or drop files up to 25 MB. Nested objects transform automatically into dot.notation columns, array values are serialized into cells, and formula injection triggers are neutralized. Download a UTF-8 BOM-encoded CSV ready for Microsoft Excel or Google Sheets.

Real Conversion Sample: Nested Objects, Arrays, and Formula Defense

Here is how nested JSON translates into a spreadsheet table. Notice how user.name and user.role flatten into separate columns, array tags stay intact, and formula commands receive protective prefixes:

Input: Nested JSON Records
[
  {
    "id": "USR-101",
    "user": {
      "name": "Elena Rostova",
      "role": "Analyst"
    },
    "tags": ["finance", "audit"],
    "active": true,
    "notes": "=SUM(A1:B1)"
  },
  {
    "id": "USR-102",
    "user": {
      "name": "Marcus Vance",
      "role": "Lead"
    },
    "tags": ["engineering"],
    "active": false,
    "notes": "+cmd|'/C calc'!A0"
  }
]
Output: Flattened CSV with Guarded Formulas
id,user.name,user.role,tags,active,notes
USR-101,Elena Rostova,Analyst,"[""finance"",""audit""]",true,'=SUM(A1:B1)
USR-102,Marcus Vance,Lead,"[""engineering""]",false,'+cmd|'/C calc'!A0

Edge Cases We Handle (And How)

Input QuirkWhat Our Parser DoesCode Location & Rule
Nested plain objectsRecursively expands keys using dot notation (user.name, user.role) into separate table columns.lib/csv.ts:439-445 (flattenObject)
Array-valued propertiesStringifies array elements with JSON.stringify and quotes per RFC 4180 without corrupting rows.lib/csv.ts:450 (formatCell)
Formula triggers (=, +, -, @)Defuses DDE injection by prefixing a single apostrophe (') unless value is a signed decimal number.lib/csv.ts:473 (neutralizeFormula)
Inconsistent record keysCollects union of all keys across records in first-seen order; missing values output as empty cells.lib/csv.ts:527-533
Windows Excel character decodingPrepends UTF-8 BOM (\uFEFF) on downloaded files to prevent ANSI mojibake while keeping clipboard BOM-free.JsonToCsvClient.tsx:28-29, 158
Matrix of arrays ([[1,2],[3,4]])Emits rows verbatim without generating synthetic column headers or discarding row indexes.lib/csv.ts:511-514

How to Convert JSON to CSV Step-by-Step

1

Add JSON Data

Paste JSON array text or upload a .json file up to 25 MB.

2

Configure Separator

Select comma, semicolon, tab, or pipe delimiter based on target tool.

3

Enable Flattening

Keep 'Flatten nested objects' active to unpack nested properties into columns.

4

Export CSV

Copy the CSV string or download data.csv directly for Excel or Sheets.

Formula Injection Defense in JSON to CSV Exports

When JSON payloads derived from web API responses or user form submissions are exported to CSV and opened in Excel, strings starting with formula characters can execute unauthorized commands. For instance, values like +cmd|'/C calc'!A0 exploit spreadsheet dynamic execution.

Our conversion pipeline executes neutralizeFormula() on every cell prior to CSV escaping. If a value begins with =, +, -, @, tab, or carriage return, it prepends a single apostrophe ('). Excel strips the apostrophe and displays the text literally without calculation.

Core Capabilities of TryDocsy's JSON to CSV Converter

100% Client-Side

All conversions run in browser memory. Records are never uploaded to remote servers.

Dot-Notation Flattening

Unpacks multi-level nested objects into structured column paths like address.city.

Key Union Protection

Scans all objects so missing fields in uneven API responses produce blank cells.

Excel-Ready Encoding

Appends UTF-8 BOM on download so special characters open without mojibake.

Multiple Delimiters

Export comma, semicolon, tab, or pipe-separated files to match your pipeline.

Debounced Live Sync

Updates output on a 120 ms keystroke debounce timer to maintain smooth typing.

When Not to Use This Web Tool

This browser converter caps uploads at 25 MB (26,214,400 bytes) to maintain responsive browser performance. If you have multi-gigabyte server logs or streaming NDJSON exports, use command-line streaming tools like mlr --ijson --ocsv cat input.json > output.csv with Miller or pipe records through jq.

Frequently Asked Questions

How do I convert JSON to CSV in my browser?

Paste your JSON array or upload a .json file up to 25 MB into the input panel. The tool parses records in local memory, flattens nested structures, and displays a CSV table. You can copy the CSV directly or download data.csv for Microsoft Excel or Google Sheets.

How does the converter handle nested objects and arrays?

By default, nested objects are flattened into dot-notation column names like user.name and user.role. Array properties (such as tag lists) are serialized as compact JSON strings within quoted cells so no nested data is lost. You can disable flattening to keep entire objects as raw text in one cell.

What happens if different records have different keys?

Our converter scans all records and builds a union of all unique keys in the order they first appear. Records missing specific properties receive empty cells rather than misaligned columns, ensuring uneven data exports align consistently.

Why does the downloaded CSV include a UTF-8 BOM?

Microsoft Excel on Windows decodes double-clicked CSV files using the system ANSI code page unless a UTF-8 Byte Order Mark is detected at the start of the file. We prepend the BOM to downloaded files to prevent mojibake on international characters. Clipboard copy stays BOM-free.

How does formula neutralization protect spreadsheet users?

Values starting with formula operators like =, +, -, or @ can execute DDE commands or macro formulas when opened in Excel. Our converter prefixes an apostrophe (') to formula triggers so desktop spreadsheet tools treat the value as inert display text.

What is the maximum file size supported?

The converter supports JSON payloads up to 25 MB (26,214,400 bytes) in browser memory. For massive database exports exceeding 50 MB, command-line stream processors like Miller (mlr --ijson --ocsv) or jq offer faster throughput.

Related Data and Spreadsheet Converters