Skip to main content

Developer Tools · No account required

Convert CSV to JSON or JSON to CSV

Convert CSV and JSON with quoted-field support, custom delimiters, preserved text values and spreadsheet formula protection.

Instructions, examples and limitations ↓

What this tool does

Turn a spreadsheet export into a JSON array, or make a CSV table from JSON objects. CSV headers become property names and CSV values stay strings, preserving postal codes, account identifiers and numbers that must not be rounded.

Enable JavaScript to use the local processing controls. Instructions and examples are available below.

Practical guide

Convert CSV to JSON or JSON to CSV

By MultiZest · Updated

How to use this tool

  1. Select the conversion direction and the CSV delimiter.
  2. Paste the input or load a text file. CSV needs a non-empty, unique header for each column; JSON needs an array of objects.
  3. Convert, inspect the result and download or copy the output. Keep formula protection enabled when opening exported CSV in a spreadsheet.

Worked example

The CSV name,code followed by Amina,00123 becomes an object with name "Amina" and code "00123". A quoted value such as "Hello, world" stays one field even though it contains a comma.

Preserving structure and values

Quoted commas, embedded line breaks and doubled quotation marks are supported. A row with too many or too few fields produces an error rather than silently shifting columns. Choose tab for TSV files and semicolon for exports using that delimiter.

JSON export to CSV takes the union of object keys. A missing or null value becomes an empty field. Nested objects and arrays become JSON text inside a cell; CSV does not preserve nested types when you convert it back.

Spreadsheet formula protection

Some spreadsheet applications interpret cells beginning with =, +, -, or @ as formulas. The default protection prefixes potentially active cells, including headers, with an apostrophe. That changes the exported text and may also affect negative numbers. Disable it only when you need exact values and trust the receiving workflow.

The input limit is 1,000,000 characters and 20,000 data rows. Large exports can still consume substantial memory. For identifiers outside JavaScript’s safe integer range, quote the numbers in the original JSON.

Preserve the values that only look like numbers

An export containing postal codes, product identifiers and phone numbers often looks numerical even though its values are labels. Keep those values as strings. A postal code such as 00123 must not become 123, and a long identifier must not be rounded merely because the receiving language can represent it as a number.

Test the conversion with a row containing a comma inside a quoted field, an empty value and a non-English name. Those examples reveal more than a table made entirely of short simple words. Use the converted JSON in the receiving application only after confirming the expected property names and value types.

Treat a spreadsheet export as a delivery format

When converting JSON back to CSV, check the header row and any nested values. Objects and arrays become text inside cells; a spreadsheet will not automatically recover their original structure. Missing and null values also need interpretation by the next system rather than being treated as identical business facts.

Keep formula protection enabled for files people will open in spreadsheets unless exact trusted text is required. Prefixing a potentially active cell can change its displayed content, so review negative numbers and identifiers. Save a source copy and a separate distribution CSV instead of repeatedly converting the same export in both directions.

Questions and troubleshooting

Does the converter change CSV numbers into JSON numbers?

No. CSV values remain strings to avoid losing leading zeros or rounding identifiers. Convert types deliberately in your application.

Why does my JSON-to-CSV result contain apostrophes?

Formula protection adds an apostrophe to cells that spreadsheet software might execute. You can disable it when exact values are required and the input is trusted.

Why do my converted JSON values remain strings?

CSV does not carry reliable type information. Keeping values as strings preserves leading zeros and identifiers. Convert selected fields deliberately using the receiving application’s schema.

Continue with a related tool

More detailed guides

Sources and further reading

Found an error or an unclear instruction? Report it. Read our editorial policy and privacy policy.