Skip to content
UtilHQ

JSON to CSV Converter

Exporting JSON data as CSV is essential when you need to share structured data with spreadsheet users, import records into legacy systems, or...

100% Free No Data Stored Instant
Paste JSON data above and click "Convert to CSV" to see results.
Ad Space
Ad Space

Share this tool

About This Tool

Exporting JSON data as CSV is essential when you need to share structured data with spreadsheet users, import records into legacy systems, or generate reports that non-technical stakeholders can open in Excel or Google Sheets. While JSON is the standard for APIs and modern applications, CSV remains the universal format that every tool understands. The challenge comes when your JSON contains nested objects, arrays, or inconsistent structures. This converter handles all of that by flattening nested properties into dot-notation keys (e.g., "address.city"), joining array values with semicolons, and normalizing rows so every record has the same columns. Paste your JSON, select a delimiter, and download a clean CSV file ready for any spreadsheet application. The converter supports comma, tab, semicolon, and pipe delimiters to match whatever format your target system expects.

How JSON to CSV Conversion Works

The converter takes a JSON array of objects and maps each object to a CSV row. Object keys become column headers, and values become cell data.

For nested structures, the tool uses dot notation to flatten hierarchies:

  • {"address": {"city": "NYC"}} becomes a column address.city with value NYC
  • Nested arrays like {"tags": ["a", "b"]} are joined with semicolons: a; b
  • Deeply nested objects are recursively flattened: user.profile.name

The tool collects all unique keys across every object to build the complete set of columns. If an object is missing a key that other objects have, the cell is left empty.

Handling Nested and Complex JSON

Real-world JSON data is rarely flat. API responses typically include nested objects, arrays of primitives, and arrays of objects. Here is how each case is handled:

  • Nested objects: Flattened with dot notation. {"user": {"name": "John"}} becomes column user.name
  • Primitive arrays: Joined into a single cell with semicolons. {"roles": ["admin", "editor"]} becomes admin; editor
  • Object arrays: Serialized as JSON strings within the cell, since CSV cannot represent nested structures
  • Null values: Converted to empty strings for clean CSV output
  • Boolean values: Converted to true or false text

This approach preserves all data while keeping the CSV as flat and readable as possible.

Choosing the Right Delimiter

The delimiter you select depends on your target application and data content:

  • Comma: Standard CSV format. Works with Excel, Google Sheets, and most import tools. Avoid if your data contains commas (the tool auto-escapes them with quotes, but some parsers struggle).
  • Tab: Best when data contains commas or semicolons. TSV files open cleanly in most spreadsheet apps and avoid quoting issues.
  • Semicolon: Standard in European countries where commas are decimal separators. Required for many European ERP and accounting systems.
  • Pipe: Common in EDI (Electronic Data Interchange) systems, mainframe exports, and certain database tools.

Best Practices for Data Export

Follow these guidelines for trouble-free CSV exports:

  • Validate JSON first: Run your JSON through a validator before converting. A missing comma or bracket will cause the entire conversion to fail.
  • Check column count: After conversion, verify the column count matches your expected schema. Extra columns usually mean unexpected nested keys.
  • Handle encoding: If your data contains non-ASCII characters (accents, CJK characters, emoji), the downloaded CSV uses UTF-8 encoding. Some older applications may need the file re-saved with a different encoding.
  • Test with a subset: For large datasets, convert a small sample first to verify the structure before processing thousands of records.

Frequently Asked Questions

Can I convert a single JSON object (not an array) to CSV?
Yes. If you paste a single JSON object, the converter treats it as an array with one element. The output will have a header row and one data row. This is useful for quickly extracting key-value pairs into a tabular format.
How are nested JSON objects handled in the CSV output?
Nested objects are flattened using dot notation. For example, {"user": {"name": "John", "address": {"city": "NYC"}}} produces columns user.name and user.address.city. This keeps the CSV flat while preserving the full data hierarchy in the column names.
What happens to arrays inside JSON objects?
Primitive arrays (strings, numbers) are joined with semicolons into a single cell. For example, {"tags": ["web", "dev"]} becomes the cell value web; dev. Arrays of objects are serialized as JSON strings since CSV cannot natively represent nested structures.
Is my JSON data sent to a server during conversion?
No. All conversion happens entirely on your device. Your JSON data is never transmitted to any server, stored in any database, or shared with any third party. The tool works completely offline once the page has loaded.
Why does my CSV have extra columns I did not expect?
Extra columns appear when different objects in your JSON array have different keys. The converter collects all unique keys from every object to build the complete column set. Objects missing certain keys will have empty cells in those columns. Review your source data if you see unexpected columns.
U

Reviewed by the UtilHQ Team

Our tools are verified for accuracy. Results are estimates for planning purposes.