Menu

Конвертер JSON в CSV

Преобразуйте массивы JSON в CSV и обратно, со строкой заголовка.

Автор Nethanel Bar, Co-founder & CEO

Последнее обновление

Ready to actually learn to code?

Coddy teaches you by writing real code in your browser - interactive lessons, instant feedback, and AI help when you get stuck.

What is a JSON to CSV converter?

A JSON to CSV converter turns structured JSON data - typically an array of objects, like an API response - into a flat comma-separated table you can open in Excel, Google Sheets, or a database import. It also works in reverse, parsing a CSV file (with a header row) back into a JSON array of objects.

Converting JSON → CSV, the tool collects every key across all objects to build the header row, then writes one row per object. Values that contain commas, quotes, or line breaks are wrapped in quotes per the CSV standard, so the output opens cleanly in any spreadsheet. Converting CSV → JSON, the first row is treated as the column names and each following row becomes an object; numbers and booleans are recognized automatically.

Everything runs locally in your browser - your data is never uploaded.

What you'll learn while converting

  • CSV is a flat, two-dimensional format; JSON can nest - deeply nested values get stringified into a single CSV cell.
  • The CSV standard (RFC 4180) quotes any field containing a comma, double quote, or newline, and doubles internal quotes.
  • A CSV needs a header row so each column maps to a JSON key on the way back.

How to convert JSON to CSV step by step

  1. Pick a direction

    Choose JSON → CSV to flatten JSON into a table, or CSV → JSON for the reverse.

  2. Paste your data

    For JSON → CSV, paste an array of objects. For CSV → JSON, paste CSV whose first row is the header.

  3. Check the columns

    Columns are auto-detected from the object keys (JSON → CSV) or the header row (CSV → JSON).

  4. Copy or swap

    Copy the result with one click, or hit swap to convert it straight back the other way.

Examples to try

A list of records

Paste a small example into the tool and change one part at a time.

Becomes a CSV with an id,name header and one row per object.

Values that need quoting

Copy the original value, run the tool, then compare the result.

The comma inside the value is preserved by wrapping the cell in quotes: "hello, world".

Common mistakes

  • Passing a single JSON object instead of an array - JSON → CSV expects an array of objects (a list of rows).
  • CSV without a header row - the first row is used as column names, so missing it shifts your data.
  • Expecting nested objects to expand into columns - deep values are stringified into one cell, not flattened automatically.

JSON to CSV FAQ

How do I convert JSON to CSV?
Paste a JSON array of objects in JSON → CSV mode. The tool builds a header from the keys and writes one CSV row per object, quoting values where needed.
Can I convert CSV back to JSON?
Yes. Switch to CSV → JSON mode and paste CSV with a header row; each row becomes a JSON object keyed by the column names.
Does it handle commas and quotes inside values?
Yes. Output follows the CSV standard - fields with commas, quotes, or newlines are wrapped in double quotes and internal quotes are doubled.
Is my data uploaded anywhere?
No. Parsing and conversion run entirely in your browser, so nothing is sent to a server.

Узнать больше

Другие инструменты разработчика

Coddy programming languages illustration

Учитесь программировать с Coddy

НАЧАТЬ