Free Online Tools Logo
Free Tools
All ToolsBlogDeveloperCalculatorsDocumentsAboutFAQDisclaimerContact
Home
Tools
JSON to CSV

JSON to CSV

Convert JSON data to CSV format

About JSON to CSV

JSON to CSV transforms structured data into spreadsheet-ready format for data analysts, business intelligence teams, and developers. Convert API responses or data exports to CSV instantly for analysis in Excel, Google Sheets, or data visualization tools.

How to use this tool

  1. Enter or paste your json to csv input into the tool interface.
  2. Adjust any available options for the result format, output style, or calculation settings.
  3. Click the action button to convert JSON to CSV and wait for the updated output.
  4. Review the result, then copy or download the output for your next task.

Example

Input

[{"name":"Alice","age":30},{"name":"Bob","age":27}]

Output

name,age
Alice,30
Bob,27

Tool guide

Flattening nested JSON for tabular output

JSON is hierarchical (objects nested within objects), while CSV is strictly two-dimensional (rows and columns). Our converter handles nested objects by flattening keys with dot notation (e.g., "address.city" becomes a column header). Arrays within JSON objects are the hardest case — an array of addresses for one user produces either multiple rows (denormalized) or a single JSON-stringified cell. Our tool offers both modes: "expand" creates one row per array element (repeating parent data), and "compact" stores arrays as JSON strings in a single cell.

Large JSON arrays (100,000+ objects) can cause browser memory issues because the entire dataset must be processed client-side. For production ETL pipelines, use a backend tool like jq or a streaming CSV parser. Our tool is best suited for moderate-sized data (up to ~10 MB of JSON) for analysis or import into spreadsheet applications.

CSV encoding pitfalls

CSV has no official encoding standard (RFC 4180 is the closest). Common issues include: values containing commas (must be quoted with ""), values containing double quotes (must be escaped as ""), and multi-line values (must be quoted). Our converter follows RFC 4180 strictly: all cells are properly quoted and escaped. It also detects the delimiter — some systems expect semicolons as delimiters (European locales) — and lets you switch between comma, semicolon, and tab. For Excel compatibility (especially on non-English systems), semicolon-delimited CSV is often required.

Character encoding is another common source of errors. Our converter outputs UTF-8 with BOM, which Excel for Windows uses to correctly detect the encoding. Without the BOM, Excel may interpret UTF-8 text as Windows-1252, mangling special characters like accented letters and em dashes.

Frequently asked questions

Can I convert CSV back to JSON?

Yes, our toolkit includes a CSV-to-JSON converter. The reverse conversion is simpler because CSV has no nesting — arrays and nested objects must be reconstructed from dot-notation headers.

What happens to null values in JSON?

Null values in JSON become empty cells in CSV. If you need to preserve "null" as a literal string, toggle the option to keep nulls as text rather than empty cells.

Does the tool handle deeply nested JSON (5+ levels)?

Yes, the flattening algorithm handles arbitrary depth. Column headers become very long (e.g., "user.profile.settings.notifications.email.enabled"), which may exceed Excel's column-width limits. Consider using the compact array mode for deeply nested structures.

Related Tools

JSON Formatter

Use our JSON formatter online to instantly format, validate, and beautify any JSON data. Paste minified JSON and get perfectly indented output with syntax error detection.

XML Formatter

Use our XML formatter online to instantly format, beautify, and validate any XML document. This free XML validator catches syntax errors and pretty prints your data.

Diff Checker

Use our diff checker online to instantly compare two texts and find differences. This free text diff tool highlights additions, deletions, and changes side by side.

About

Free Online Tools offers a curated collection of 30+ browser-based utilities plus a blog with practical guides, quick tips, and tool tutorials.

Author: Zohaib Hassan
Role: Full-Stack Web Developer
Expertise: Web development, SEO, and digital tools since 2020

Tools

  • All Tools
  • Blog
  • Developer Tools
  • Document Tools
  • Calculators

Legal

  • Privacy Policy
  • Terms of Service
  • Disclaimer
  • FAQ
  • Contact

Creator

Built by Zohaib Hassan, a full-stack web developer from Pakistan with expertise in building fast, accessible, and privacy-friendly web applications.

About Me•Sitemap

© 2026 Free Online Tools by Zohaib Hassan. All rights reserved.

Online Free Tools — Built with care for developers worldwide