</> Online Utilitiesdev.conversiontools.online

CSV to JSON — convert CSV to JSON instantly

Paste CSV or open a spreadsheet export and get clean JSON the moment you type. The delimiter is detected automatically — comma, semicolon, tab or pipe — quoted fields with commas and line breaks parse correctly, and you choose the output: an array of objects keyed by the header row, an array of arrays, or NDJSON, with numbers and booleans converted to real JSON types.

Try an example dataset

One click loads a realistic CSV with the right settings — quoted fields, semicolons, tabs and type conversion included.


    
    
Send this JSON to…

The current JSON output travels in the link itself. Very long output is copied to your clipboard instead, ready to paste into the next tool.

Your session

Conversion snapshots and pinned setups live only in this tab's memory — close or reload the page and they are gone, so your CSV and JSON are never stored. The tools rail remembers only which tools you opened in this tab (session storage, no data).

Conversion history

  • No snapshots yet — convert valid CSV and it will appear here.

Favorite setups

  • No pinned setups yet. Pin the current delimiter, header, type and shape settings to reuse them in one click.

Favorite tools

  • Pin a tool below and it will appear here.

Recently used

  • No other tools used yet this session — tools you open from this page will appear here.

All encoding & conversion tools

    How to convert CSV to JSON

    1. Paste your CSV into the box, or use Open .csv file to load an export from Excel, Google Sheets or any other app — the file is read locally, never uploaded.
    2. Conversion happens live. The delimiter is auto-detected; adjust First row, Value types, Output shape and Formatting only if the defaults do not match your file.
    3. Check the table preview and stats to confirm the parse, then Copy JSON or Download .json.

    Worked example

    This 87-character CSV input (4 lines):

    name,age,city,active Ada,36,London,true Grace,85,New York,true Alan,41,Manchester,false

    converts with the default settings — header row on, type conversion on, 2-space indent — to 264 characters across 20 lines:

    [ { "name": "Ada", "age": 36, "city": "London", "active": true }, { "name": "Grace", "age": 85, "city": "New York", "active": true }, { "name": "Alan", "age": 41, "city": "Manchester", "active": false } ]

    The stats under the tool report 3 data rows · 4 columns · 12 fields. Notice what type conversion did: 36 became the number 36 and true became the boolean true, while names and cities stayed strings. Choosing Minified shrinks the same output to 173 characters on one line, and NDJSON produces one object per line, starting with {"name": "Ada", "age": 36, "city": "London", "active": true}.

    How values are converted

    CSV valueWith type conversion onWith conversion off
    36, -4.5, 1e3JSON number (36, -4.5, 1000)String, exactly as written
    true / falseJSON booleanString
    nullJSON nullString
    02153, 007Stays a string — leading zeros are preserved so ZIP codes and IDs are never corruptedString
    Empty fieldEmpty string ""Empty string ""
    Anything elseString, surrounding spaces trimmed only if the field was unquotedString

    Delimiters and file quirks this tool handles

    CaseWhat happens
    Semicolon filesCommon in European Excel exports where commas are decimal separators. Auto-detect picks ; when it dominates the first line.
    Tab-separated (.tsv)Auto-detect recognizes tabs; forcing Tab also works for pasted spreadsheet ranges copied straight from Excel or Sheets.
    Quoted fields"New York, NY" stays one field; a doubled quote "" inside quotes becomes one "; quoted fields may span multiple lines.
    Duplicate header namesThe second id column is renamed id_2, the third id_3, so no column overwrites another. Blank headers become column_1, column_2, and so on.
    Ragged rowsShort rows are padded with empty strings; extra values in long rows land under extra_1, extra_2 keys — and the status line names the offending rows.
    CRLF and blank linesWindows line endings parse the same as Unix ones, and fully blank lines are skipped rather than producing empty objects.

    What to do with your JSON next

    JSON is usually a waypoint, not the destination. The Send this JSON to… bar under the output carries the current result into the next tool for you:

    1. Beautify or minify it — send it to the JSON Formatter to re-indent, sort keys A–Z or compress it to one line.
    2. Validate before you ship it — the JSON Validator gives a dedicated validity report with line and column errors.
    3. Round-trip it — JSON to CSV turns the array back into a spreadsheet-ready file, handy for checking nothing was lost.
    4. Encode it for transport — Base64 for headers and tokens, or the URL Encoder/Decoder when JSON must travel inside a query string.
    5. Keep a reference offline — download the cheat sheet from the tool above: delimiter rules, type-conversion table and output-shape guidance, plus your current headers.

    Working the other way? The Fake Data Generator exports CSV you can paste straight in here, and text chained in from any other tool lands in the input box automatically, ready to convert.

    Frequently asked questions

    How does the CSV to JSON converter map columns?

    With "First row is a header" on (the default), the first row supplies the JSON keys and every following row becomes one object in an array: a CSV with columns name, age and city produces objects like {"name": "Ada", "age": 36, "city": "London"}. Turn the header off and the output is an array of arrays instead, with every row — including the first — treated as data.

    Which delimiters are supported?

    Comma, semicolon, tab and pipe. Auto-detect (the default) inspects the first line, ignoring anything inside quotes, and picks the delimiter that appears most often — so European-style semicolon files and tab-separated exports from Excel convert without any setup. You can also force a delimiter manually.

    Are numbers in my CSV converted to JSON numbers?

    Only when type conversion is on (the default). Values like 36, -4.5 and 1e3 become JSON numbers, true and false become booleans, and the literal null becomes JSON null. Values with leading zeros such as 02153 or 007 stay strings, because converting them would silently change the data. Turn conversion off to keep every value a string, exactly as written.

    What happens with quoted fields, commas inside values, and line breaks?

    The parser follows RFC 4180: a field wrapped in double quotes can contain the delimiter, line breaks, and double quotes escaped by doubling them ("" becomes "). So "New York, NY" stays one field, and a quoted multi-line address becomes a single JSON string with \n where the break was.

    What if rows have different numbers of columns?

    Short rows are padded with empty strings and long rows get their extra values under generated keys (extra_1, extra_2) in object mode, so nothing is silently dropped. The status line warns you exactly which rows were inconsistent, so you can fix the source file if the mismatch was a mistake.

    What is NDJSON and when should I use it?

    NDJSON (newline-delimited JSON) puts one complete JSON object on each line instead of wrapping everything in an array. It suits streaming imports, log-style data and tools like BigQuery, Elasticsearch and jq that process records line by line. Choose it from the Output shape control; it needs the header row on, since each line must be an object.

    Is my CSV uploaded or stored?

    No. Parsing and conversion happen entirely in your browser with JavaScript — nothing is uploaded, stored or tracked, and files you open are read on your device only. That makes the tool safe for exports containing customer or business data, though you should still avoid pasting live passwords or secrets into any tool.

    Can I send the converted JSON straight to another tool?

    Yes. Use the Send this JSON to… bar under the output: it carries the current JSON in the link to the JSON Formatter, JSON Validator, JSON to CSV converter, Base64 or URL encoder, so you can format, validate, convert or encode it without copying and pasting. Very long output is copied to your clipboard instead.

    Does this page remember my CSV between visits?

    No. Conversion snapshots, pinned favorite setups and the recently-used tools list live only in this tab's session memory and disappear when you close or reload the tab. Your CSV and JSON are never written to storage, uploaded or tracked — close the tab and they are gone.

    Related encoding & conversion tools

    About this tool

    The CSV to JSON Converter is one of 33 free utilities in the Online Utilities Suite at dev.conversiontools.online. Its parser is written for this page to the RFC 4180 rules — quoted fields, escaped quotes, embedded line breaks and mixed CRLF/LF endings — and it reports ragged rows instead of guessing silently. Every tool in the suite runs entirely in your browser, so results are instant and private even on large files.

    Privacy

    This page processes everything locally in your browser: no account, no uploads, and nothing you paste is stored or sent to a server. Files you open are read on your device only. Conversion snapshots stay in this tab's memory only; the tools rail uses session storage to remember tool names you opened — never your CSV or JSON. Advertising on this site is served by Google AdSense, which may use cookies to personalize ads; you can opt out of personalized advertising in your Google ad settings.