JSON to CSV Converter
JSON Input
empty
CSV Output
ready
Ad · 728x90
JSON to CSV Guide
What JSON formats can be converted to CSV?+
This converter handles two main formats. An array of objects (most common):
[{"name":"Alice","age":30},{"name":"Bob","age":25}] — each object becomes a row, keys become column headers. A single object: {"name":"Alice","age":30} — converted to a single-row CSV. Deeply nested objects are flattened using dot notation or underscores. Arrays within objects are joined as comma-separated strings within the cell. Inconsistent keys across rows are handled gracefully — missing values appear as empty cells.What is CSV and when should I use it instead of JSON?+
CSV (Comma-Separated Values) is a plain-text tabular format where each row is a line and columns are separated by delimiters (commas, semicolons, tabs). Use CSV when you need to: open data in Excel or Google Sheets, import data into databases or data warehouses, work with business intelligence tools (Tableau, Power BI), share flat tabular data with non-technical users, or process large datasets with pandas or R. Use JSON when data is hierarchical (nested objects), when you need arrays of arrays, or when communicating between web services. JSON handles complex structures; CSV handles flat tables.
What does "flatten nested objects" mean?+
CSV is a flat (2D) format — it has rows and columns, but no nesting. When your JSON has nested objects like
{"user":{"name":"Alice","city":"NY"}}, this tool flattens them into separate columns. With dot notation, this becomes two columns: user.name and user.city. With underscores: user_name and user_city. The "Skip nested" option omits nested objects entirely and only includes top-level primitive values. Arrays within objects (like {"tags":["a","b","c"]}) are joined into a single cell as a,b,c.When should I use semicolons instead of commas?+
In European countries (Germany, France, Netherlands, Poland, etc.) where commas are used as decimal separators (e.g., 1.234,56 for a number), Microsoft Excel and LibreOffice Calc default to semicolons as the CSV delimiter. If you open a comma-separated CSV in these locales, Excel may not split columns correctly. Use semicolons if your CSV will be opened in European-locale Excel, or if your data contains commas within values (e.g., addresses like "123 Main St, Suite 4"). Use tab as delimiter for TSV files, which are common in bioinformatics and some data pipelines.
How does this converter handle special characters and quotes?+
Per the RFC 4180 CSV standard: fields containing the delimiter, double quotes, or newlines are wrapped in double quotes. Double quotes within a field are escaped as two double quotes (
""). Example: the value He said, "Hello" becomes "He said, ""Hello""" in CSV. The "Quote all fields" option wraps every field in double quotes regardless — useful when importing into strict parsers. Newlines within JSON string values are preserved as literal newlines within a quoted CSV field, which is valid per RFC 4180 but may not render correctly in all editors.How do I open the downloaded CSV in Excel?+
Double-clicking the CSV usually works if your system locale uses commas. For European locales or when columns do not split correctly: in Excel, go to Data → From Text/CSV → select the file → choose the correct delimiter in the import wizard. In Google Sheets: File → Import → Upload the CSV file → Separator type: Comma (or whichever you chose). For Python:
import pandas as pd; df = pd.read_csv('file.csv'). For large files (100K+ rows), pandas or DuckDB will outperform Excel. For SQL databases: use COPY table FROM 'file.csv' CSV HEADER; in PostgreSQL.What happens with missing or null values?+
JSON arrays often have inconsistent keys across rows — one object may have a "phone" field and another may not. This converter collects all unique keys from all rows to build the headers, then fills missing values with empty strings. JSON
null values appear as empty cells when "Include null values" is checked (which outputs an empty field), or are completely omitted when unchecked. JSON false and 0 are valid values and are preserved. In Excel, empty cells and null cells look identical; in pandas, null appears as NaN.How do I convert CSV back to JSON?+
To convert CSV back to JSON in JavaScript: parse each row with a CSV parser, map rows to objects using the header row as keys. In Python:
import csv, json; rows = list(csv.DictReader(open('file.csv'))); print(json.dumps(rows, indent=2)). In Node.js: use the csv-parse package. In the browser: use PapaParse (Papa.parse(csvString, {header: true})). Online tools like this site's JSON Formatter can help validate the resulting JSON. Note that type information is lost in CSV — all values come back as strings, so numbers and booleans need to be re-cast.Is my data safe when using this converter?+
Yes, completely. All conversion happens in your browser using JavaScript. Nothing is sent to any server. The tool works offline once the page is loaded — you can disconnect from the internet and it will continue to function. We have no logs, no analytics on your data, and no access to what you paste. This makes it safe to use with sensitive data: API responses with user PII, internal company data, authentication tokens in JSON responses. The only data that leaves your device is the AdSense ad request, which has no knowledge of what you paste into the tool.
What is the maximum file size this tool can handle?+
This tool processes JSON entirely in your browser's JavaScript engine. It comfortably handles JSON files up to several megabytes (tens of thousands of rows). For very large files (10MB+), the conversion will complete but the table preview may scroll slowly — use the Text view for better performance. For files exceeding 50MB, consider using command-line tools:
jq -r '(.[0] | keys_unsorted) as $keys | $keys, (.[] | [.[$keys[]]] | @csv)' data.json (jq) or Python pandas: pd.read_json('data.json').to_csv('out.csv', index=False). These handle files with millions of rows efficiently.