Skip to content
AllToolsDesk

Popular

  • JSON Formatter & ValidatorFormat, minify and validate JSON with error locations.
  • CSS FormatterBeautify CSS, SCSS and Less with Prettier.
  • CSS MinifierCompress CSS and see the bytes saved.
  • JavaScript FormatterBeautify JavaScript and TypeScript.
  • JavaScript MinifierMinify JavaScript with Terser.
  • HTML FormatterIndent HTML, including inline CSS and JS.
  • JPG to PDFTurn images into a PDF, one per page.
  • Merge PDFCombine several PDFs into one file.
38 free toolsSee all tools

CSV to JSON Converter

Convert CSV or TSV into a JSON array of objects. Detects the delimiter, handles quoted fields and line breaks, and turns numbers into numbers.

Runs in your browser. Nothing is uploaded.

Ready.

About the CSV to JSON Converter

CSV is how spreadsheets, databases and many business systems export data, while JSON is what web apps, APIs and scripts expect. Converting between them by hand is tedious and easy to break when fields contain commas, quotes or line breaks.

This converter follows the CSV rules for quoted fields, detects whether your file uses commas, semicolons or tabs, and turns each row into an object keyed by the header row. Numbers and true or false values can be converted to proper JSON types, while values such as ZIP codes and long IDs are kept as text so no leading zeros or digits are lost.

How to use the CSV to JSON Converter

  1. 1

    Paste rows copied from a spreadsheet, open a .csv or .tsv file, or load the sample. It converts straight away.

  2. 2

    Leave the delimiter on Auto, or pick one if your file uses semicolons (common in European Excel exports) or tabs.

  3. 3

    With “First row is header” on, each row becomes an object keyed by the column names; turn it off to get arrays.

  4. 4

    “Detect numbers” turns 42 and 3.5 into JSON numbers and true or false into booleans. Turn it off to keep every value as text.

  5. 5

    Switch the output to Tree to check the result, then copy it or download a .json file.

Examples

1Rows with a header
Before
name,age,city
Ada,36,London
Grace,85,New York
After
[
  {
    "name": "Ada",
    "age": 36,
    "city": "London"
  },
  {
    "name": "Grace",
    "age": 85,
    "city": "New York"
  }
]
2Quoted values with commas and quotes
Before
sku;title;price
A-1;"Desk, oak";249.5
B-2;"The ""Pro"" chair";189
After
[
  {
    "sku": "A-1",
    "title": "Desk, oak",
    "price": 249.5
  },
  {
    "sku": "B-2",
    "title": "The \"Pro\" chair",
    "price": 189
  }
]

Good to know

  • Numbers that would lose precision as JSON numbers (such as 16-digit IDs) and values with leading zeros (like 007 or ZIP codes) are kept as text.
  • Empty cells become empty strings, not null, so no data is lost.
  • Files up to 5 MB can be opened; very large exports are better converted with a command-line tool.

Frequently asked questions

My Excel CSV uses semicolons. Will it work?

Yes. Auto picks whichever of comma, semicolon, tab or pipe appears most in the first row. If it guesses wrong, choose the delimiter yourself.

What happens to duplicate or empty column names?

Empty headers become column_1, column_2 and so on, and repeated names get a suffix (email, email_2), so no value overwrites another.

What if a row has more or fewer values than the header?

Missing values become empty strings. Extra values are kept under column_N keys, so you can spot the problem in the output.

Is my text uploaded to a server?

No. Everything is processed in your browser. Your text is never sent to our servers or stored anywhere.

More tools that pair well with this one.

Browse all tools