What is CSV to JSON?
CSV to JSON converts CSV or TSV text to JSON, using the first row as property names or producing arrays of values.
How It Works
- Enter your CSV or TSV text and the separator in the input fields on this page.
- Press the button to run CSV to JSON.
- Read the JSON in the result area, and copy or download it.
Worked Example
This is the real result CSV to JSON returns for the sample input shown, captured by running the tool itself.
| CSV Content | name,age
John,30 |
|---|
| Delimiter (type a tab for TSV, defaults to comma) | , |
|---|
[
[
"name",
"age"
],
[
"John",
"30"
]
]
Common Uses
- Preparing spreadsheet data for an API or a script.
- Loading a table into a JavaScript project.
- Checking what a CSV file really contains.
Good to Know
Quoted fields, commas inside quotes and line breaks inside quotes are handled. Empty cells become empty strings.
What it does
Paste CSV or TSV text and the tool converts it to JSON. By default it uses the first row as property names and gives you an array of objects; you can instead get an array of arrays. The separator can be detected automatically or set to comma, tab, semicolon or pipe.
Worked example
name,age then Ann,30 then "Lee, Bo",x becomes two objects. The quoted field keeps its comma, so the second name is Lee, Bo. Numbers become JSON numbers (30), and anything that is not a number, such as x, stays text, because the Values option converts numbers, true, false and null by default. Values with leading zeros, such as the ID 007, are kept as text so identifiers are not damaged. Choose Keep everything as text if you want every value left as a string.
Tips
Put the header names in the first row and keep one record per line. Wrap any value that contains the separator or a line break in double quotes. If the result looks wrong, check the separator setting first: a semicolon file read as comma puts everything in one column.
Frequently Asked Questions
Does it keep leading zeros?
Yes. A value like 007 stays as text so the zeros are not lost.
Can it read a file?
Paste the contents of the file into the box.
Is my data uploaded?
No. It is converted in your browser.
What does CSV to JSON do?
CSV to JSON converts CSV or TSV text to JSON, using the first row as property names or producing arrays of values.
What do I need to enter in CSV to JSON?
Your CSV or TSV text and the separator.
Is my data private in CSV to JSON?
CSV to JSON runs in your browser, so what you enter is not uploaded to MyToolDock.
What input does CSV to JSON expect?
CSV to JSON expects: CSV Content. A second field, Delimiter (type a tab for TSV, defaults to comma), is also used. For example, entering name,age
John,30 is a valid starting point.
What does CSV to JSON return for a sample input?
With name,age
John,30 as input, the tool outputs: [
[
"name",
"age"
],
[
"John",
"30"
]
]
Is MyToolDock CSV to JSON free to use?
Yes, MyToolDock CSV to JSON is 100% free with no registration, subscriptions, or limits. All features are fully unlocked.
Where can I learn more about CSV to JSON and related workflows?
MyToolDock publishes written guides on the topic: CSV to JSON: Simplifying Web Data Imports. Each guide links back to the tools it covers.