freesabai

Developer tools

CSV to JSON converter

Paste CSV text or open a file and get JSON: a list of objects named after the heading. It finds the separator for you, reads fields that hold quotes, commas and line breaks, and does not spoil numbers with a leading 0 (like a postcode 01234). It runs in your browser and your file is not sent anywhere.

Getting the tool ready…This tool needs JavaScript. If you still see this after a few seconds, JavaScript is switched off in your browser or the page did not load completely: turn JavaScript on or reload the page.

How to use it

  1. Paste CSV text in the left box, or press "Open file" and choose a .csv file.
  2. The separator is found for you (choose it yourself if it is wrong). Tick whether the first row is the heading.
  3. Press "Copy", or "Download" a .json file.

Frequently asked questions

Is Thai text from an Excel CSV file read correctly?

A file saved as "CSV UTF-8" reads Thai correctly, and the tool drops the BOM at the start. If you saved a plain CSV from an older Excel on Windows, the file may use the computer's legacy encoding (Windows-874), which a browser does not read as UTF-8. Save it again as "CSV UTF-8".

Why is the postcode 01234 still text?

A number that starts with 0, or has more than 15 digits (a card or account number), would lose its leading zero or its last digits as a number, so it is kept as text. To make every field text, untick "Turn numbers and true/false into their own types".

What about missing fields and repeated headings?

A row shorter than the heading gets null for the missing fields. An empty heading is named column_N, and a repeated heading gets _2, _3. The tool tells you when it does this.

Good to know

Your data stays on your device

Everything runs in your browser. What you type, paste or open is not sent to freesabai's servers or anyone else's, and is not kept in the browser: close the page and it is gone. The site only counts how many times this page was opened and how many times someone copied or saved a result (never what was pasted or the result, and you can switch the counting off in the footer; see the privacy policy).

Report a problem or suggest an idea

Found a bug, or want this tool to do more? Tell us on the feedback page. No sign-up.

Other developer tools

JSON and data

Encoding, hashes and tokens

Generators

Time, numbers and colour

Text and code

Questions and answers

How do I convert CSV to JSON, and does it take semicolons or tabs?

Paste CSV or open a .csv file. The separator (comma, semicolon, tab or pipe) is found for you, or pick it if it guesses wrong, tick whether the first row is the heading, then press "Copy" or "Download" a .json file.

Why is the postcode 01234 still text, and is Thai from Excel read correctly?

A number with a leading zero or more than 15 digits is kept as text so nothing is lost. A file saved as "CSV UTF-8" reads Thai correctly; a CSV from an older Excel (Windows-874) should be saved again as CSV UTF-8.

What about short rows or repeated headings, and is the file uploaded?

Missing fields become null, an empty heading is named column_N and a repeated one gets _2, _3, and the tool tells you. Files up to 20 MB open, converted in your browser; nothing is uploaded.