JSON to CSV Converter

Convert JSON arrays to CSV tables for Excel or Google Sheets, and back, right in your browser.

๐Ÿ“ Drag & drop .json / .csv file here, or click to select
File is read in browser only ยท Max 8MB
CSV Output

๐Ÿ“Œ If Korean characters appear broken in Excel, turn on "Excel-compatible UTF-8 BOM". A BOM (Byte Order Mark) will be prepended to the saved (downloaded) CSV file, allowing Excel to read UTF-8 correctly. Copy-pasting does not apply the BOM, so it's safer to use the "Save" button when transferring to Excel.

What is the JSON to CSV Converter?

Need to open API data in Excel or Google Sheets? This tool instantly converts JSON arrays into CSV tables, and can also convert CSV back to JSON. It's free, requires no installation, and runs entirely in your browser. Key features include automatically flattening nested objects (like `user.name`) into distinct columns and an option to add an Excel-compatible UTF-8 BOM, which fixes broken characters in spreadsheets. Since your data is never sent to a server, you can safely convert sensitive information.

How to use

  1. Paste your data into the input box, or drag and drop a .json or .csv file. The conversion direction is set automatically based on the file type.
  2. Choose your options below, such as the `Delimiter` (Comma, Tab, Semicolon), or check boxes for `Flatten nested objects (a.b.c)` and `Excel-compatible UTF-8 BOM`.
  3. The result appears instantly in the output box. A data preview and statistics like `Data Rows` and `Columns (Fields)` are shown at the bottom.
  4. Click `Copy` to put the result on your clipboard, or `Save` to download the converted data as a .csv or .json file.
  5. Use `Result to Input` to swap the output back to the input for further conversion, or `Clear` to start over.

JSON to CSV Converter guide

How this tool is used in real work, and what to watch out for.

Why non-English characters look broken in Excel, and the BOM

This is the most common problem users of this tool face. The conversion works fine, but when you open the CSV file in Excel, you see question marks or garbled text like "ๅ ์™์˜™".

The cause is Excel. On many systems, Excel doesn't assume a file is UTF-8. Instead, it tries to read it using a local legacy encoding (like CP949 in Korea or Windows-1252 in Western Europe). When it tries to interpret a 3-byte UTF-8 character using the wrong character map, the text breaks.

The solution is a BOM (Byte Order Mark). If you prepend three special bytes (EF BB BF, or U+FEFF) to the start of the file, Excel recognizes it as UTF-8. The "Excel-compatible UTF-8 BOM" option does exactly this.

Google Sheets always reads files as UTF-8, so characters display correctly even without a BOM. If you need to open an existing BOM-less file in Excel, use the "From Text/CSV" feature on the Data tab and specify the original file encoding as 65001 (UTF-8).
The BOM is only added when you save (download) the file. If you copy the text from the result box and paste it into Excel, there's no opportunity to add the BOM. If you're moving data to Excel, always use the "Save" button.

The problem of disappearing leading zeros in phone numbers

It's that classic problem where a phone number like `01012345678` becomes `1012345678` in Excel, or a 16-digit credit card number turns into `1.2346E+15`. This happens because CSV is plain text with no type information, and Excel makes its own guess: "if it looks like a number, I'll treat it as a number."

This tool's CSV โ†’ JSON conversion is designed to avoid this pitfall.

  • Values starting with a `0` (like phone numbers or postal codes) are not converted to numbers but are kept as strings.
  • Numbers with 16 or more digits (like credit card or some account numbers) are also kept as strings. This is because storing them as standard JavaScript numbers would lose precision.
  • The text `true`, `false`, and `null` are converted to their respective boolean and null types. If you uncheck "Auto-detect numbers & booleans", all values will remain strings.
In the other direction (JSON โ†’ CSV), this tool cannot control how Excel will interpret the values. The BOM only solves the encoding issue; it can't specify cell formatting. If you must preserve leading zeros, open a new sheet in Excel, set the format for the relevant columns to "Text", and then use the data import feature to load your CSV.

Flattening Nested JSON โ€” The Rules of Dot Notation

API responses are often nested, but CSV is a flat table, so the nested structure must be unfolded. When "Flatten nested objects (a.b.c)" is enabled, the tool creates column names by joining the object path with dots.

  • For arrays, the index becomes part of the key, like `tags.0` and `tags.1`. If the number of items varies between rows, the number of columns will expand to accommodate the longest array.
  • If flattening is disabled, nested objects and arrays are embedded as a JSON string within a single cell. Use this when you need to preserve the original structure.
  • In the CSV โ†’ JSON direction, enabling flattening does the reverse: it restores column names with dots back into nested objects, allowing for a perfect round trip.
  • If keys differ from row to row, the tool collects all unique keys from all rows to form the columns, leaving cells blank where a key doesn't exist for a particular row.
json
{ "orderId": "A-0042",
  "customer": { "name": "John Doe", "contact": "555-1234-5678" },
  "tags": ["new", "VIP"] }

โ†’ columns: orderId | customer.name | customer.contact | tags.0 | tags.1
If an original key name already contains a dot (e.g., a key is literally named `"user.name"`), it will be split incorrectly when converting back to JSON. The only workarounds are to disable flattening or rename the key before conversion.

Values Containing Quotes, Commas, or Newlines

In CSV, if the delimiter (e.g., a comma) appears inside a value, it will break the table structure. According to the RFC 4180 standard, such values must be enclosed in double-quotes. Any double-quotes within the value itself must be escaped by doubling them. This tool handles all of this automatically.

  • Changing the delimiter to a semicolon (;) helps with opening files in versions of Excel that use it as a list separator (common in many European regions).
  • If you select Tab (TSV), the saved file extension will be `.tsv`. For data with many commas in the content (like addresses or product descriptions), TSV can be cleaner and easier to read.
  • Line endings are written as CRLF (Carriage Return, Line Feed) for maximum compatibility with Excel and other Windows applications, as this is the de facto standard.
Original ValueCSV OutputReason
Cordless Drill, 20V"Cordless Drill, 20V"Contains a comma
Drill Bit Set "Pro""Drill Bit Set ""Pro"""Quotes are escaped by doubling them
First line and second line"First line and second line"Contains a newline
Padded " Padded "Prevents Excel from trimming leading/trailing spaces

Input Formats and Limitations

To create a proper table, the input should be an "array of objects," which provides a clear source for column names. However, since real-world API responses are rarely so clean, the tool intelligently handles a few common variations.

  • Wrapped arrays like `{ "data": [ โ€ฆ ] }`: If the root object contains exactly one key whose value is an array, the tool will automatically use that array. If there are multiple keys with array values, it can't know which to use, and the output will be a single-row table of the parent object.
  • A single JSON object: This will be converted into a table with one data row.
  • Drag-and-drop a `.json`, `.csv`, or `.tsv` file. The tool will automatically detect the file type and set the conversion direction and delimiter. The file is processed entirely in your browser and never uploaded; max file size is 8MB.
Clicking the "Result to Input" button moves the output back into the input field and flips the conversion direction. This is the fastest way to verify if a JSON โ†’ CSV โ†’ JSON round trip preserves your data. It's a great way to spot subtle changes caused by settings like auto-typing or flattening.

Frequently asked questions

What JSON format is supported?

It accepts an array of objects `[{"key": "val"}]`. It also auto-detects an array within an object like `{"results": [...]}` or converts a single object into a one-row table.

Why do my non-English characters look broken in Excel?

To fix this, check the `Excel-compatible UTF-8 BOM` option and use the `Save` button. This adds a marker to the downloaded file that tells Excel how to read the text correctly.

What does "Flatten nested objects" do?

It turns nested data like `{"user": {"name": "John"}}` into a single `user.name` column. If unchecked, you get a `user` column containing the JSON string `'{"name":"John"}'`.

Is my data sent to your servers?

No. All conversion happens entirely in your web browser. Your JSON or CSV data is never uploaded, ensuring your private and sensitive information remains secure on your computer.