JSON to CSV Converter
Instantly convert JSON data to CSV format for easy import into Excel, Google Sheets, and data analysis tools. Supports nested JSON automatic flattening (Nested Flatten), custom delimiters, and UTF-8 BOM. Pure front-end processing to ensure data privacy.
JSON to CSV conversion FAQ
Popular questions about JSON, CSV format conversion and Excel import
JSON and CSV are two data formats with completely different purposes:
- JSON(JavaScript Object Notation) is a structured data format that supports nested objects and arrays and is suitable for data exchange and API communication between programs.
- CSV(Comma-Separated Values) is a plain text table format. Each row represents a record and each column represents a field. It is a common format for import and export of Excel, Google Sheets, and databases.
The following situations are suitable for converting JSON to CSV:
- API data needs to be imported into Excel or Google Sheets for analysis
- Prepare data sets for machine learning or statistical analysis
- Share structured data with non-technical people (CSV can be opened directly in Excel)
- Import data into the database (MySQL and PostgreSQL support CSV import)
- Generate reports or spreadsheets for review by decision makers
CSV is a two-dimensional table format (rows × columns) and cannot directly represent nested structures. Use this tool Dot Notation Flattening Technology to automatically convert nested objects into flat fields:
JSON input
{
"user": {
"name": "Gary",
"age": 30
}
}
CSV output
user.name,user.age Gary,30
Flattening rules:
- object → Recursive flattening, Key is concatenated with points, for example
profile.address.city - Array → Save as JSON string in a single cell to avoid field explosion
- Null → Processed according to null value setting (empty string / null / N/A / 0)
When flattening occurs, an orange tip will appear at the top of the tool: "Nested JSON has been automatically flattened."
There are several ways to import CSV into Excel:
- Open directly: After downloading the .csv file, open it directly with Excel (select UTF-8 encoding)
- Import from data: Excel → Data → Import from text/CSV → Select file → Specify delimiter and encoding
- Drag to Google Sheets: Simply drag the .csv file into Google Sheets to automatically parse it
What is UTF-8 BOM?
BOM (Byte Order Mark) is located at the beginning of the file mark. For CSV files:
- Enable BOM → Excel will automatically recognize UTF-8 encoding and correctly display Chinese, Japanese and other Unicode characters
- No BOM → Excel may be opened with the system default encoding (such as Big5), resulting in garbled characters
💡 If the Chinese characters are garbled after importing the CSV into Excel, please enable the "UTF-8 BOM" option and download again.
The "C" in CSV stands for Comma, but in fact CSV can use different delimiters:
- comma(,) — The most common standard, default for Excel and Google Sheets. However, if the data contains commas (such as the address "Taipei City, Taiwan"), it must be wrapped in quotation marks.
- Semicolon (;) — The default delimiter in Excel in some European regions (since the comma is used as a decimal point). If your CSV doesn't break into columns correctly in Excel, try semicolons.
- Tab(\t) — Also known as TSV (Tab-Separated Values). If commas and semicolons appear frequently in your data, Tab is the safest choice. Many database import tools prioritize TSV.
💡 Not sure which one to use? Use commas first. If Excel does not display properly, try using semicolons instead.
Here are some of the most common problems and solutions:
-
Nest object data missing?
This tool automatically flattens nested JSON (e.g.
profile.age), but if the JSON structure is too complex (such as more than 5 levels of deep nesting), it is recommended to simplify the data before converting. -
Array data is truncated?
Array fields are kept in a single cell as a JSON string (e.g.
"["a","b","c"]"), it may not be automatically expanded after importing into Excel. You can process further in Excel using "Data → From Table/Range". - Chinese characters become garbled characters? Enable the "UTF-8 BOM" option and re-download, Excel will correctly recognize UTF-8 encoding.
- CSV all crammed into one column in Excel? Use "semicolon (;)" or "Tab (\t)" as the delimiter instead, or manually specify the delimiter when importing into Excel.
100% safe. This tool adopts a pure front-end (Client-side) architecture, and all JSON parsing and CSV conversion are completed in your browser.No data will be uploaded to any server。
This means:
- Your customer data, API responses, and trade secrets never leave your computer
- No internet connection is required to perform the conversion (except when loading the page for the first time)
- No backend servers store or process your content
- Even ToolHub administrators cannot access the data you enter
Whether you're analyzing customer lists, processing financial data, or transforming confidential API responses, it's safe to do it here.
From JSON to CSV: A Complete Guide to Data Analysis and Spreadsheet Conversion
In modern data processing workflows,JSON(JavaScript Object Notation) with CSV(Comma-Separated Values) represent two key stages of data exchange: JSON is the communication format between machines, and CSV is the bridge between analysts and spreadsheets. Mastering the conversion from JSON to CSV is a core skill in data analysis, back-end development and business intelligence.
What is JSON?
JSON is a lightweight, language-agnostic data exchange format. it useskey value pair({"key": "value"}) andArray([item1, item2]) to organize the data. The core advantage of JSON is that itstructuring ability——It can use nested objects to express complex data relationships, which CSV cannot do directly.
In modern web development, JSON is everywhere: responses to RESTful APIs, database query results (MongoDB, PostgreSQL JSONB), configuration files (Node.js package.json), instant messaging (WebSocket), etc. But when you need to import this data into Excel or perform statistical analysis, you need to convert JSON to CSV format.
What is CSV?
CSV is a plain text representation of tabular data. Dating back to the 1970s, it is one of the oldest and most widely supported data exchange formats. CSV’s design is minimalist:One record per row, one field per column, separated by commas。
The advantage of CSV is that ituniversality: Excel, Google Sheets, Numbers, database management tools, Python Pandas, R, MATLAB... Almost all tools that process tabular data support CSV. It is the "universal language" in the data ecosystem, suitable for long-term archiving and cross-platform exchange.
Detailed comparison of JSON and CSV
JSON
- Supports nested structures and complex data relationships
- Supports multiple data types (string, number, Boolean, Null, array, object)
- Machine parsing is highly efficient and is an API standard format.
- Not suitable for direct import into spreadsheet
- Larger file (contains structured markup)
CSV
- Flat two-dimensional table, one record per row
- Only plain text data is supported (all values are treated as strings)
- Humans can directly open and edit with Excel
- Suitable for data analysis, statistics and reports
- The files are streamlined and take up little space
Practical example: nested JSON → CSV automatic flattening
JSON input (including nested objects)
[ { "id": 1, "name": "Alice Chen", "email": "[email protected]", "profile": { "age": 28, "city": "Taipei", "department": "Engineering" }, "skills": ["JavaScript", "Python"], "active": true }, { "id": 2, "name": "Bob Wang", "email": "[email protected]", "profile": { "age": 35, "city": "Taichung", "department": "Design" }, "skills": ["Figma", "UI/UX"], "active": false } ]
CSV output (auto-flattening)
"id","name","email","profile.age","profile.city","profile.department","skills","active" "1","Alice Chen","[email protected]","28","Taipei","Engineering","[""JavaScript"",""Python""]","true" "2","Bob Wang","[email protected]","35","Taichung","Design","[""Figma"",""UI/UX""]","false"
Nested objects automatically flatten to profile.age、profile.city fields; arrays are retained as JSON strings.
Application of CSV in data analysis scenarios
- Excel / Google Sheets: Directly open or import CSV, and use pivot analysis tables, charts, and formulas to explore data
- Python Pandas:
pd.read_csv()Is the most common way to load data in data science projects - Database import:MySQL
LOAD DATA INFILE, PostgreSQLCOPYAll commands natively support CSV - BI tools: Tableau, Power BI, Looker Studio and other business intelligence tools all support CSV as a data source
- machine learning: CSV is the standard format for Kaggle competitions, dataset publishing, and model training input.
Why choose ToolHub’s JSON to CSV Converter?
- Nested JSON automatic flattening: Exclusively supports point-based flattening of nested objects (
user.name、profile.address.city), eliminating the need to manually handle complex structures. - Flexible CSV options: Output Header, custom delimiters (comma/semicolon/Tab), Quote control, UTF-8 BOM, and null value processing to meet the needs of different tools.
- Dual view mode: There are two modes of Raw CSV source code and Table preview to confirm the conversion results instantly.
- Excel Compatible: UTF-8 BOM ensures that Chinese and Unicode characters are displayed correctly in Excel.
- Zero server architecture: All conversions are 100% done in the browser and your data is never leaked.
Whether you're importing API responses into Excel for analysis, preparing data sets for use in machine learning, or need to convert structured data into reporting formats, ToolHub's JSON to CSV Converter can complete the task accurately, safely, and efficiently. Start converting now and experience a seamless transition from JSON to CSV.