JSON to CSV Converter

Convert a JSON array of objects into clean CSV with a header row — or flip the direction and turn CSV back into JSON. Everything runs locally in your browser.

JSON to CSV Converter features

Bidirectional Conversion

Convert JSON to CSV and CSV to JSON with a single direction toggle and a Swap button.

Automatic Header Row

JSON to CSV builds the CSV header from your object keys, and CSV to JSON reads the first row as headers.

Type Inference

CSV to JSON detects numbers and booleans so values become real JSON types, not just quoted strings.

Safe Quoting & Escaping

Powered by PapaParse, it correctly handles commas, quotes, and newlines inside field values.

100% Private

All conversion runs in your browser. Your data is never uploaded to any server.

Copy in One Click

Grab the converted CSV or JSON instantly and paste it into a spreadsheet, file, or app.

Overview

JSON and CSV are two of the most common formats for exchanging tabular data. JSON (JavaScript Object Notation) stores data as nested objects and arrays, while CSV (Comma-Separated Values) is a flat, spreadsheet-friendly format where each line is a row and columns are separated by commas. Converting between them lets you move data between APIs, databases, and tools like Excel or Google Sheets.

This JSON to CSV Converter is bidirectional. In the JSON to CSV direction, it takes an array of flat objects — for example [{"name":"Ada","age":36},{"name":"Alan","age":41}] — and produces a CSV with a header row built from the object keys, followed by one row per object.

In the CSV to JSON direction, it treats the first row as headers and converts each remaining row into an object. Values are type-inferred, so numbers and booleans become real JSON numbers and booleans instead of quoted strings. Use the direction toggle or the Swap button to switch which way the conversion runs.

Under the hood it uses PapaParse, a battle-tested CSV library that correctly handles quoting and escaping of commas, double quotes, and newlines inside field values — the edge cases that break naive split-on-comma converters.

How to use the JSON to CSV Converter

  1. Paste or type your data into the input panel on the left.
  2. Choose the conversion direction — JSON to CSV or CSV to JSON — using the toggle.
  3. For JSON to CSV, make sure your input is an array of flat objects; for CSV to JSON, make sure the first row contains your column headers.
  4. Read the converted result in the output panel as it updates.
  5. Click Copy to copy the output, or use Swap to reverse the direction and convert it back.
  6. Paste the result into a spreadsheet, file, or code as needed.

Good to know

A few things to keep in mind when using this converter:

  • Flat objects only for JSON to CSV. The input should be a JSON array of flat objects. Nested objects or arrays inside a field are not automatically expanded into separate columns.
  • Type inference is one-directional convenience. CSV to JSON converts numeric and boolean-looking values into real JSON numbers and booleans, so a perfect round-trip back to the original string values is not guaranteed.
  • Headers matter. CSV to JSON uses the first row as the property names, so make sure your CSV has a header row.
  • Quoting is handled for you. Commas, quotes, and newlines inside values are escaped correctly via PapaParse — you do not need to pre-clean them.

Private by design

Every byte you paste into the JSON to CSV Converter is processed locally in your browser. Formatly makes no network request with your data, logs nothing, and stores nothing on any server — so it is safe for API responses, tokens, configuration and other sensitive content. Your most recent input and theme are saved only in your own browser's local storage.

JSON to CSV Converter FAQ

Is my data uploaded to a server?

No. This converter runs entirely in your browser using client-side JavaScript. Your JSON and CSV never leave your device and are never sent to any server, which makes it safe for sensitive or proprietary data.

Does it work offline?

Yes. Once the page has loaded, the conversion happens locally, so it continues to work even without an internet connection. You can convert between JSON and CSV without sending any requests.

What is the difference between JSON to CSV and CSV to JSON here?

JSON to CSV expects an array of flat objects and turns it into rows, building the header from the object keys. CSV to JSON treats the first row as headers and converts each remaining row into an object, inferring types so numbers and booleans are not left as strings. Use the direction toggle or Swap to switch.

What kind of JSON does the JSON to CSV direction expect?

It expects a JSON array of flat objects, like [{"id":1,"name":"Ada"},{"id":2,"name":"Alan"}]. Each object becomes a row and each key becomes a column. Deeply nested objects or arrays inside a field are not flattened into separate columns, so flatten your data first if you need nested values as individual columns.

How does it handle commas, quotes, and line breaks inside values?

It uses PapaParse, which correctly quotes and escapes fields that contain commas, double quotes, or newlines. That means a value like Hello, "world" is wrapped and escaped properly so the CSV stays valid and round-trips back to JSON cleanly.

Why are some CSV values turning into numbers or true/false in the JSON?

That is type inference in the CSV to JSON direction. A cell containing 42 becomes the number 42 and true becomes a boolean, rather than staying a quoted string. This usually matches what you want, but if you need everything kept as text, be aware that numeric-looking and boolean-looking values are converted.

Can I convert CSV back into the original JSON?

In most cases, yes — use the Swap button to reverse the direction. Because quoting and escaping are handled correctly, well-formed data round-trips reliably. Keep in mind that type inference and the requirement for flat objects mean the result may differ slightly from deeply nested original JSON.