Pixuna

Pixuna Guide

How to Convert CSV to JSON and JSON to CSV

Convert between CSV and JSON in your browser, with delimiter detection, type handling, and flattening of nested objects.

Published · 2 min read

Open CSV to JSON

CSV to JSON

With a header row, each CSV row becomes a JSON object keyed by the column names. Without one, each row becomes an array. Pixuna detects commas, semicolons, tabs, and pipes automatically, handles quoted fields with embedded delimiters and line breaks, and gives blank or repeated header names unique names.

Type detection converts plain numbers and true/false to JSON types and empty cells to null. Leave it on for data analysis, but turn it off when a column holds identifiers such as phone numbers or codes where exact text matters.

JSON to CSV

The JSON to CSV tool expects an array of objects, an array of arrays, or an object containing a single array. Columns are the union of all keys, so records with different fields still line up. Nested objects are flattened into dotted names such as address.city, and arrays of simple values are joined with "; ".

Arrays that contain objects are kept as a JSON string in one cell, because there is no single correct way to turn them into rows.

Round trips are not always identical

CSV has no types and no nesting, so converting JSON to CSV and back can change structure. Check the result if you rely on it, and keep your original data.

  • Choose the output delimiter your target program expects; many European spreadsheet settings use semicolons.
  • Large numbers beyond JavaScript’s safe integer range can lose precision.
  • Everything runs in your browser; the data is not uploaded.