Pular para o conteúdo
Tool

CSV ↔ JSON Converter

Instantly convert CSV spreadsheets to JSON format or JSON Arrays to CSV file.

What it is

The CSV and JSON Converter goes both ways: paste or upload a CSV and get JSON, or paste JSON and get a CSV back. It is the small chore that sits between a spreadsheet export and an API, and it comes up constantly.

The two directions

CSV to JSON is what you reach for when a client, a colleague or an export gives you a table and your code needs objects. The first row becomes the keys; every row after it becomes an object.

JSON to CSV is the opposite trip, and it is the one people underestimate. JSON allows nesting, and a spreadsheet does not: an array of flat objects converts cleanly, but an object containing another object has to be flattened first, usually by joining the names with a dot. Records that do not all share the same keys end up with empty cells wherever a key was missing.

How to use it

  1. Paste your data or add a file.
  2. Pick the direction, CSV to JSON or JSON to CSV.
  3. Copy or download the result.

Things that trip people up

The separator. Not every CSV uses a comma. Semicolons are common wherever the decimal separator is a comma, and a mismatch produces one giant column.

Quoting. A value that itself contains the separator has to be wrapped in quotes, and a quote inside a quoted value has to be doubled. Malformed quoting is the most common reason a CSV parses into nonsense.

Type inference. A code like 007 read as a number becomes 7. If leading zeros matter, keep the column as text.

Nothing is uploaded

The whole conversion happens in your browser. Your data is never sent to a server, never stored and never seen by anyone else, which matters when you are converting an export full of real records.

Frequently asked questions

Can it convert nested JSON to CSV?

A spreadsheet has no concept of nesting, so nested objects have to be flattened, usually by joining the names with a dot. An array of flat objects converts cleanly; deeply nested data needs reshaping first.

My CSV parsed into nonsense. What went wrong?

Usually the separator or the quoting. Not every CSV uses a comma, and a value containing the separator has to be wrapped in quotes, with any internal quote doubled.

Are leading zeros preserved?

Only if the column is treated as text. A code like 007 read as a number becomes 7, which is the classic surprise with product codes and postcodes.

Is my data uploaded?

No. Both directions run entirely in your browser, so nothing is sent anywhere or stored.

About this content

Written by:
Ferramenta Grátis

Related tools