Minifyr

Privacy-first tool

CSV ↔ JSON Converter

Convert CSV data to JSON or turn a JSON array of objects into CSV with configurable delimiters and headers.

Runs locally No uploads Privacy-first

Result


        

Related tools

More privacy-first utilities you may find useful.

Guides

Learn more about this topic.

Frequently asked questions

Does it support quoted CSV fields?

Yes. Quoted fields, escaped quotes and newlines inside fields are supported.

Which JSON shape is supported?

JSON to CSV expects an array of objects, which is the most common API format.

Can I choose the delimiter?

Yes. Comma, semicolon, tab and pipe are supported.

Are CSV values converted to numbers or booleans?

No. CSV values stay as strings so identifiers with leading zeros and values such as postal codes are not corrupted. Convert types explicitly in your application.

Can I convert nested JSON objects?

JSON to CSV expects an array of objects. Nested objects and arrays are stringified so data is not lost; flatten the JSON first if you need separate columns.

What happens to missing keys?

When converting JSON to CSV, keys missing from an object produce empty cells in that row.

What Is CSV ↔ JSON Conversion?

CSV and JSON are two common ways to represent structured data. CSV is compact and spreadsheet-friendly, while JSON is the standard format for APIs and applications. This converter moves data between both formats: paste CSV to get a JSON array of objects, or paste a JSON array of objects to get CSV rows.

The conversion runs locally in your browser. It is useful for preparing test data, migrating spreadsheet exports, inspecting API payloads and moving data between tools without writing a script.

How to Convert CSV to JSON

  1. Paste CSV into the input box.
  2. Choose the delimiter: comma, semicolon, tab or pipe.
  3. Leave First row is header enabled if the first row contains column names.
  4. Select Convert.
  5. Copy or download the JSON output.

With a header row, each data row becomes an object whose keys are the header names. Without a header row, the converter generates keys such as column1, column2 and so on.

How to Convert JSON to CSV

  1. Switch to JSON → CSV.
  2. Paste a JSON array of objects.
  3. Choose the output delimiter.
  4. Select Convert.

The converter collects the union of object keys and uses them as CSV headers. Each object becomes a row. Missing keys are left empty, and values that contain quotes, delimiters or line breaks are escaped with standard CSV quoting.

Quoted Fields and Newlines

CSV supports fields wrapped in double quotes. Inside a quoted field, a literal quote is escaped by doubling it, and commas or line breaks are treated as data rather than separators. This parser handles quoted fields, escaped quotes and newlines inside fields, which are common in exports from spreadsheet and CRM tools.

name,notes
Alice,"Likes commas, quotes and
multi-line text"

Delimiters and Locales

Comma-separated files are common in English-speaking regions, while semicolon separators are common in locales where the comma is used as a decimal separator. Tab-separated files often come from spreadsheet exports. Choose the delimiter that matches the source, and use the same delimiter when importing the result elsewhere.

Data Types

CSV has no native types: every value is text. When converting CSV to JSON, this tool keeps values as strings, so "30" remains a string rather than becoming the number 30. That is intentional because converting values automatically can corrupt postal codes, phone numbers and identifiers with leading zeros. Convert types explicitly in your application when needed.

When converting JSON to CSV, nested objects and arrays are stringified so the data is not silently lost. If you need flattened columns, transform the JSON before converting.

Common Errors

  • Invalid JSON: single quotes, trailing commas and comments are not valid JSON.
  • Not an array: JSON to CSV expects an array of objects, not a single object or a primitive.
  • Inconsistent columns: rows with different lengths produce empty cells in the JSON output.
  • Wrong delimiter: a semicolon file parsed as comma-separated will produce a single column.

CSV vs TSV vs JSON

CSV and TSV are flat table formats: rows and columns, with a delimiter separating values. TSV uses a tab instead of a comma and is common in spreadsheet and database exports. JSON is hierarchical: it can represent nested objects, arrays, numbers, booleans and null values. Use CSV or TSV for flat tabular data and JSON for APIs, configuration and nested structures. Converting a nested JSON document to CSV loses hierarchy unless you flatten it first.

Preparing a Clean Import

  • Use UTF-8 to preserve accents and non-Latin characters.
  • Keep one header row and unique column names.
  • Remove duplicate rows before converting large exports.
  • Normalize dates to ISO 8601 when possible.
  • Check the delimiter and quoting rules of the target system.

Exporting and Importing Data

Before moving data between systems, confirm which format the target expects, which delimiter and encoding it uses, and whether it infers types. Keep a backup of the original export, convert a small sample first, and verify row counts and special characters before processing the full dataset. A quick check on a few rows prevents silent data loss on large files.

Privacy

All parsing and conversion happen in your browser. Your CSV or JSON is not uploaded or stored. For further cleanup, use JSON Formatter or Remove Duplicate Lines.

Related Tools

Format the resulting JSON with the JSON Formatter, clean up text with Text Minifier, or inspect encoded values with the Base64 Encoder / Decoder.