Skip to content

CSV and JSON Converter

Convert CSV to JSON or JSON to CSV, with headers, numbers and booleans, nested fields from dotted column names, JSON Lines and a table preview.

  • Free, no sign-up
  • Runs in your browser
  • Sources cited

Paste CSV, a JSON array, or JSON Lines. The direction is detected unless you choose it.

JSON

Rows
3
Columns
6
Delimiter
comma

Table preview

order_idcustomer.namecustomer.statetotalpaidnote
1001Ana LopezTX129.90true
1002Brown, LeeCA45.00falseGift wrap, "fragile"
1003Chen WuNY310.25trueExpress

Everything runs in your browser. Nothing you enter is uploaded.

How to use the CSV and JSON converter

  1. Paste or open the data

    Paste CSV, a JSON array or JSON Lines, or open a .csv, .tsv, .json or .jsonl file. The direction and the delimiter are detected.

  2. Check the table preview

    The first rows appear as a table, so you can see at once that the columns lined up.

  3. Choose how values come out

    Turn numbers and true or false into JSON values, decide what empty fields become, and build nested objects from column names such as customer.name.

  4. Pick the output format

    Write JSON as an array or as JSON Lines, indented or minified, or CSV with any delimiter, quoting and line breaks.

How CSV and JSON conversion works

CSV has no single official standard, but RFC 4180 describes the common form: one record per line, fields separated by commas, and any field that contains a comma, a double quote or a line break wrapped in double quotes, with quotes inside it doubled. The converter reads that form, and also semicolons, tabs and pipes, which spreadsheets in many countries use, ragged rows and a byte order mark.

CSV fields are always text; JSON distinguishes numbers, true, false and null. With typed values on, fields that look exactly like numbers become numbers, but numbers with leading zeros, such as ZIP codes, stay text, and so do integers too large for JSON readers to hold exactly. Column names with dots become nested objects, and converting back flattens nested objects into dotted columns again.

JSON Lines writes one JSON value per line instead of one large array, which suits logs and big datasets that are processed line by line. The converter reads and writes both. Everything runs in your browser, so the data never leaves your device.

Worked example

The example CSV has a header and 3 orders. The second order’s customer name, "Brown, Lee", is quoted because it contains a comma, and its note doubles the quotes around “fragile”. In the JSON they become "Brown, Lee" and "Gift wrap, \"fragile\"".

With typed values, the total 129.90 becomes the number 129.9 and the paid column becomes true or false. The columns customer.name and customer.state combine into {"customer":{"name":"Ana Lopez","state":"TX"}}. Converting the JSON back gives the header order_id,customer.name,customer.state,total,paid,note.

Understanding the result, and common mistakes

  • Rows with a different number of fields. Usually a missing quote or an unquoted delimiter; the tool warns and keeps the extra fields in their own columns.
  • Numbers losing their leading zeros. The converter keeps them as text, but a spreadsheet that opened the CSV first may already have removed them.
  • Semicolon files opened as comma files. Leave the delimiter on Detect, or pick it yourself.
  • Excel showing accented letters wrongly. Save the CSV as UTF-8 and use CRLF line breaks for the widest compatibility.

Frequently asked questions

Is my data uploaded?

No. The conversion runs in your browser, and links carry only your settings.

How big a file can it convert?

Up to about 5 MB of text, depending on your device.

What happens to nested JSON when converting to CSV?

Nested objects become dotted column names such as user.name, and lists of simple values are joined with semicolons. Turn nesting off to keep each nested value as JSON text.

Can I convert without a header row?

Yes. Turn off “First row is the header” and each row becomes a JSON array.

Sources

  1. RFC 4180: Common Format and MIME Type for Comma-Separated Values (CSV) FilesRFC Editor · retrieved Nov 14, 2026
  2. RFC 8259: The JavaScript Object Notation (JSON) Data Interchange FormatRFC Editor · retrieved Nov 14, 2026
  3. JSON LinesJSON Lines · retrieved Nov 14, 2026

About these results

  • Conversion runs in your browser. Nothing you paste or open is uploaded.