Pro Every tool, icon and stickerAll of Pro for $5.99/month

  • All 85 tools
  • Festival Post Maker
  • Icon & sticker pack ZIPs
Go Pro
HubToolify
Text Tools

CSV to JSON Converter Pro

Paste or drop a CSV and get JSON, or go back from JSON to CSV with the switch at the top. You control how values are typed, how the output is shaped and how it is indented. Free preview · Pro required to export. Convert and copy up to 3,000 characters free. Pro removes this limit and adds downloads.

Free preview · Pro required to export. Convert and copy up to 3,000 characters free. Pro removes this limit and adds downloads.

Loading…

Why use this tool?

  • APIs, front-end code and configuration files want JSON, while the data usually starts life in a spreadsheet export.
  • Naive converters turn an order id like 0042 into the number 42; this one keeps it as text so nothing is silently lost.
  • A CSV with quoted commas, line breaks inside cells or a semicolon delimiter needs a proper parser, not a split on commas.
  • You can see the first rows as a table and the warnings before you copy anything into a project.

How to use CSV to JSON

  1. Check the direction switch reads "CSV → JSON", then paste CSV into the box or drop a .csv, .tsv or .txt file. Press Sample to try an example.
  2. Leave Delimiter on "Detect automatically", or choose comma, semicolon, tab or pipe.
  3. Untick "First row holds the column names" if your file has no header row.
  4. Choose how to read values with "Read numbers as numbers", "Read true, false and null as themselves" and the empty-cell option.
  5. Pick an Output shape and Indent, then press the copy button or download data.json.

Features

  • Two directions: CSV to JSON and JSON to CSV
  • Delimiter detection plus manual choices: comma, semicolon, tab, pipe
  • Three output shapes: array of objects, array of arrays, or one object per line (NDJSON)
  • Indent of 2 spaces, 4 spaces or minified
  • Numbers with a leading zero, or that would not survive conversion, stay text
  • Duplicate and blank column names are made unique, as column_1 or name_2
  • Warnings for unclosed quotes and rows with the wrong number of fields
  • Counts for rows, columns, delimiter and output size

Supported formats

Accepts pasted text or .csv, .tsv, .txt and .json files up to 8 MB. Produces JSON, NDJSON or CSV, which you can copy or download as data.json or data.csv.

Tips

  • If a column holds phone numbers or ids, leave "Read numbers as numbers" on; anything with a leading zero stays a string anyway.
  • Choose NDJSON when the output is going into a log pipeline or database import that reads one record per line.
  • Dates are left as text, because JSON has no date type and guessing a format can go wrong with a decimal comma.
  • Dropping a .json file on this page flips the direction to JSON → CSV, so check the switch if the output looks odd.

Frequently asked questions

Is my data sent to a server?

No. The conversion runs in your browser tab on the text you paste or the file you drop.

What if my file has no header row?

Untick "First row holds the column names". The columns are then named column_1, column_2 and so on.

Why did 0042 stay as text?

Turning it into a number would drop the leading zero. A value is only converted when the number would convert back to exactly the same text.

What does it do with rows that have too few fields?

It lists the line numbers of those rows in a notice and fills the missing fields with empty values.

How are empty cells handled?

They become an empty string by default. Tick the null option to get null instead.

What is NDJSON?

One JSON object per line, with no surrounding array. It is not valid JSON as a whole, but many export and logging systems use it.

Can I try this Pro tool without an account?

Yes. Convert and copy up to 3,000 characters free. Pro removes this limit and adds downloads. Your own input is processed locally in your browser.

Will upgrading keep my work?

Checkout and login open in a separate tab. Keep the workspace open to retain inputs, settings and previews. Files stay in that tab only; keep the originals in case you close or reload it. Export access is checked with the server after payment.

Your files are processed directly in your browser and are not uploaded to HubToolify's servers.