Skip to main content

CSV to JSON converter

Convert CSV spreadsheets to JSON

No watermarkFree & unlimited
Mode
Input (CSV)
Output (JSON)
All processing happens in your browser. No data is sent to any server.

Paste a table or drop a .csv file and Papa Parse reads it with the header row switched on, so every data row becomes an object whose keys are the column names. Blank lines are skipped and values are typed as it goes: digits become numbers, the words true and false become booleans, and everything else stays a string. The delimiter is sniffed from the text rather than configured, so comma, semicolon, tab and pipe files all work. The output is a JSON array printed with two-space indentation, ready to paste into code.

Key facts about CSV to JSON converter

Key facts about CSV to JSON converter
ParserPapa Parse 5.5 with header, skipEmptyLines and dynamicTyping enabled. No options are exposed for you to change.
Output shapeAlways a flat array of objects, one per data row, serialised with two-space indentation.
DelimiterDetected from the content, covering comma, semicolon, tab and pipe, which suits European exports out of the box.
Value typingNumeric strings become numbers and true or false become booleans. Empty cells stay as empty strings.
Leading zerosLost. A postcode or product code like 007 arrives in the JSON as the number 7, not the string.
Long identifiersA 19-digit ID exceeds what a JSON number holds exactly, so the last digits change. Prefix or quote such columns.
Quoted fieldsCommas, semicolons and line breaks inside double quotes are handled, including doubled quotes as an escape.
Duplicate headersTwo columns with the same name collapse into one key, and the later column wins.
NestingNone is inferred. A header such as user.name becomes a literal key with a dot in it, not a nested object.
Live previewIn paste mode a table shows the first ten rows and the total row count before you convert.
ModesPaste and convert, or file upload. This pair is one of the few with both, because CSV and JSON are both text.
Size ceilingThe file picker stops at 500 MB, but practical limits come from your device memory long before that.

What happens to your file

Both modes stay on your machine. Pasted text never leaves the textarea it is typed into, and an uploaded file is read with the File API and parsed by the copy of Papa Parse bundled into this page. The JSON is built with JSON.stringify in the same tab and handed to the clipboard or to a local download. Nothing is logged, nothing is queued for processing elsewhere, and no request carrying your rows is made, which matters when the table contains customer records or export data.

About this tool

  1. 1

    Choose a mode

    Paste and convert is selected by default. Switch to file upload for anything too large to paste comfortably.

  2. 2

    Add the data

    Paste the CSV into the input panel or drop a .csv file. The first row is treated as the header.

  3. 3

    Check the preview

    In paste mode a table appears under the panels showing the first ten parsed rows and the total count.

  4. 4

    Convert

    Press the convert button and the JSON array appears in the output panel with a character count.

  5. 5

    Copy or download

    Use the copy button for pasted input, or save a .json file when you converted from an uploaded file.

Specs & compatibility
Input and outputTakes .csv (text/csv) and returns the JSON as a blob with the application/json type, named after the file you dropped in.
EnginePapa Parse 5.5.3 bundled into the page reads the CSV, and JSON.stringify writes the array back out - no worker, no WebAssembly, no download.
ModesBoth modes: paste the CSV in and copy the JSON straight back out, or hand over a file and take the JSON as a download.
Batch and capsTwenty CSV files per run at 500 MB each; several JSON results are zipped in page memory as converted-json-files.zip.
Browser and deviceCSV to JSON needs only the File API, a Blob download and the parser already in the bundle, so every current browser behaves the same and the page keeps working with the network off.
  • Clean the header row before converting. Those exact strings become your JSON keys, spaces, capitals, trailing blanks and all.
  • Protect codes that must stay text. Automatic typing turns 007 into 7 and strips a leading plus from phone numbers, so rename the column or fix the values afterwards.
  • Semicolon files from a European spreadsheet need no special handling, because the delimiter is detected from the text rather than assumed to be a comma.
  • Use the preview table as a sanity check on quoting. If a field containing a comma has spilled into the next column, the quotes in your source are unbalanced.
  • For anything above a few megabytes, switch to file upload rather than pasting, since a very large paste makes the textarea itself sluggish.
  • Turn a spreadsheet export into seed data for an API, a test fixture or a MongoDB import without writing a parsing script.
  • Convert an analytics or billing export into JSON so it can be filtered and reshaped in a JavaScript console.
  • Prepare a lookup table from a CSV for a static site or a configuration file that expects JSON.
There is no delimiter control, because Papa Parse examines the text and picks the one that produces a consistent number of fields, testing comma, semicolon, tab and pipe. That covers virtually every export, including the semicolon files that spreadsheets produce in European locales. If detection ever goes wrong, the usual cause is inconsistent quoting rather than an unusual separator.
Automatic typing converts anything that looks numeric into a JSON number, and JSON numbers are double-precision floats that hold about fifteen significant digits exactly. A nineteen-digit identifier therefore comes out altered at the end. The same mechanism strips leading zeros from postcodes and product codes. Where exactness matters, keep those values as text downstream or add a non-numeric prefix at the source.
They become empty strings rather than null, and the key is still present on every object, so the shape of your records stays uniform. Rows that are entirely blank are dropped altogether, because empty lines are skipped during parsing. If you need nulls instead of empty strings, a single find-and-replace over the output handles it.
No. CSV is a flat format and the conversion treats it as one, so every record is a flat object with exactly the columns your header row defines. A header written as address.city becomes a key containing a literal dot, not a nested object. Building real nesting requires knowledge of your schema, which a general converter does not have.
The picker rejects anything above 500 MB, but the real constraint is memory. Parsing holds the text, the parsed rows and the serialised JSON in the tab at once, so a file of a few hundred megabytes can exhaust a browser tab well before that ceiling. Files up to roughly fifty megabytes convert comfortably on a typical laptop.
Yes. Keys are added to each object in the order the header row lists them, and that order is preserved through serialisation, so the JSON reads the same way the spreadsheet did. Most consumers treat object key order as insignificant, but it makes the output far easier to scan and to diff against the original file.
View all

Need the opposite? Try JSON to CSV

Updated

We use anonymous analytics to improve ToolChamp. No personal data is stored or sold. Privacy Policy