How to use CSV/JSON Converter
- Choose the conversion: delimited text to JSON, JSON to delimited text, XML to JSON, JSON to XML, Excel workbook to JSON, or JSON to an Excel workbook.
- Paste the table into the input box, or choose one CSV, TSV, text or .xlsx file. A chosen file is read instead of the text box.
- Set the delimiter, the quote character and the header row option, and open More options for the worksheet, formula cells and encodings.
- Read the summary for the row and column counts, then copy or download the result.
Example: CSV/JSON Converter
Turn a two-row CSV table into an array of objects.
Options
- Conversion
- Six directions share one page. Delimited text covers CSV, TSV, pipe-separated and a delimiter you type yourself. Excel workbook means .xlsx only, and a chosen workbook is read one worksheet at a time.
- Delimiter and quote character
- Detection suits a well-formed file. Set the delimiter when a European file uses semicolons, or when quotes inside cells confuse detection. Another character lets you type one character such as ^. The quote character is a double quote unless the file was written with a single quote.
- Worksheet and formula cells
- For an .xlsx file, name the worksheet or give its position, such as 2. A formula cell shows the value the spreadsheet stored, which is what a reader can trust without recalculating anything. The other choice prints the formula text with a leading = and still never calculates it.
- Encoding
- An input file is read as UTF-8 unless you pick another encoding. A Windows-1252 or UTF-16 file that was refused as invalid UTF-8 usually needs its own encoding named, or a re-export as UTF-8. A CSV or XML download is UTF-8 unless you pick UTF-16 for an older spreadsheet.
- Protect spreadsheet formulas
- When writing CSV, cells that begin with =, +, - or @ are prefixed so a spreadsheet reads them as text rather than running them. Prefix risky cells with an apostrophe is the default; the space option uses a leading space, and Off leaves cells untouched. An .xlsx download needs no prefix because every cell in it is stored as text.
Supported inputs and limits
Where your input is processed
This tool processes your input in this browser. Your text and files are not uploaded to UseFreeTools. Check this tool's limits for anything it may save on your device.
Why the formula guard changes your cells
A spreadsheet treats any cell starting with =, +, - or @ as a formula, which is convenient until a CSV holds data you did not write. Opening that file can make the spreadsheet evaluate the text. The guard prefixes the cell, defaulting to an apostrophe, and spreadsheets read the rest as text. The apostrophe is normally hidden in the cell view. If your data legitimately starts with one of those characters and the CSV is not going into a spreadsheet, choose Off.
Why an .xlsx download needs no formula guard
The writer stores every cell as an inline string, so a value that begins with = is a piece of text in the file rather than a formula to run. That is also why the workbook download keeps a value such as 0012 exactly as text. Read the file back here and a formula-looking cell comes out unchanged, which makes the round trip predictable.
What is read before a workbook is unpacked
The ZIP directory is read first: the number of parts, the size each part expands to, and the name of every part. A file that claims to expand far past its stored size, carries a password, holds a macro part, or hides a name outside the package is refused before any part is unpacked. Worksheet XML is then read against the spreadsheet namespace, so an element from another namespace is ignored rather than treated as a row.
Questions about CSV/JSON Converter
Do I have to save my spreadsheet as CSV first?
No. Choose Excel workbook to JSON, pick the .xlsx file and name the worksheet if you need a sheet other than the first one. Files saved as .xls, macro workbooks and password-protected files are refused, so save a plain .xlsx copy instead. A browser too old to stream the workbook says so and asks for CSV, rather than reading the file a slower way.
Why did a date from my Excel file turn into a number?
A spreadsheet stores a date as a number and puts the readable date in the cell format, and this reader does not read cell formats. Format the column as text in the spreadsheet and save again when you need the date exactly as it looked.
Which values count as numbers?
Number conversion is off by default so leading zeros, IDs and scientific notation survive the round trip. Even with it on, 007 stays text because a leading zero is not valid in a JSON number, and a value longer than 15 digits stays text.
Why does my exported CSV start some cells with an apostrophe?
The guard is protecting the spreadsheet, because those cells begin with =, +, - or @. Set Protect spreadsheet formulas to Leave cells exactly as they are if the apostrophe would corrupt the data.
My file was refused as not valid UTF-8. What now?
Name the encoding the file actually uses, usually Windows-1252 for an older export or UTF-16 for a file saved by a text editor, or re-export it as UTF-8. In Excel, choose CSV UTF-8 rather than the older CSV option.