Skip to converter

CSV to JSON converter

This route reads delimited text and emits an array of objects whose keys come from your header row. The interesting part is not the rename — it is what each cell becomes. Follow one concrete export through the parser and you will know which columns turn into numbers and which stay text.

All values become text unless they look like plain numbers.

Drop files here or CSV, up to 50 MB each, 10 at a time
    Add a file to start.

    Processed on your device. Files aren’t sent anywhere.

    No sign-up. Nothing to install.

    One export, side by side

    Illustrative input: a membership list exported from a spreadsheet, with an address that contains a comma and an ID column of leading-zero codes.

    • Header row: id,name,address,joined,visits
    • Row: 007, Ada, "12 High St, Unit 3", 2024-03-11, 42
    CSV columnWhat the parser seesJSON result
    id007 — digits with a leading zero"id": "007" (string)
    nameAda — plain text"name": "Ada"
    addressquoted field containing a comma"address": "12 High St, Unit 3"
    joined2024-03-11 — not a plain number"joined": "2024-03-11"
    visits42 — plain integer"visits": 42 (number)

    How the file is read

    The parser walks the text character by character. A quote opens a field, so separators and newlines inside quotes are kept as content, and a doubled quote inside a quoted field becomes one literal quote. That is what lets an address with a comma survive as a single value.

    If you do not tell it the separator, it guesses from the first chunk of text by counting semicolons, tabs and commas. The detection is heuristic — a file whose quoted content happens to contain many commas can be read with the wrong separator. Nothing here validates your CSV against a schema; it parses what it finds.

    • Quoted fields may contain the separator, doubled quotes and embedded newlines
    • Delimiter detection is a heuristic over the opening text, not a guarantee
    • A line with a single empty cell is dropped rather than emitted as an empty row
    • A byte-order mark at the start of the file is stripped

    Switching the header row off

    The First row is a header toggle changes the shape of the output, not just its labels. With it on, row one supplies the keys and every later row becomes an object. With it off, the output is an array of arrays, positional and index-based — useful for headerless dumps, awkward for code that wants named fields.

    A blank header cell is not ignored: it becomes a generated key such as column3, so a missing label still produces a usable field.

    Values that stay strings — usually what you wanted

    Typing is deliberately narrow: only a plain decimal pattern becomes a number. 007 keeps its leading zero as a string, and 2024-03-11 stays text, because both would be destroyed by numeric conversion. Scientific notation such as 1.5e3 also stays a string.

    Quoting does not opt a value out of typing. A quoted 123 still becomes the number 123. The one real hazard is precision on a very large plain integer: a 19-digit order number matches the number pattern, passes through JavaScript Number, and can end up rounded. Keep such identifiers in a column whose values do not look like plain numbers, or fix them after export.

    • Plain integers and decimals become JSON numbers
    • Leading-zero codes, dates and scientific notation remain strings
    • Empty cells become empty strings, not null
    • Duplicate header names collapse: the last column with that name wins

    Where this parser stops short

    Two toggles exist here: Header, and Readable indentation. Pretty output is indented for humans; switched off it is compact for programs. There is no delimiter override on this route, and no type coercion beyond the plain-number rule above.

    • Up to 10 files per run, each up to 50 MB
    • Each input becomes one JSON document named after the original file
    • No schema validation: a ragged row yields objects with missing or empty fields
    • Nested structure is not built from a flat table — for that, write JSON directly or use JSON to CSV in reverse

    Checking the output before you use it

    Open the JSON and read the first object. Confirm the key names match your header, that the identifier column is still quoted text, and that the row count matches your spreadsheet minus any blank lines. A conversion that succeeded can still be wrong if the delimiter guess or the typing rule did something you did not expect.

    1. Read the first object and the last object, not just the file size
    2. Compare object count with your expected row count
    3. Search for a value you know should be text and confirm it stayed text
    4. If the delimiter was guessed wrong, re-export with an explicit separator or convert the TSV route instead

    Questions

    Are my CSV files uploaded?
    No. Parsing and serialisation run in your browser tab; the file is read from your disk and the JSON stays in memory until you download it.
    Why did my ID column stay a string?
    The typing rule only converts plain decimal values. Leading-zero codes, dates and scientific notation are left as strings, which is normally the behaviour you want for identifiers.
    Can I force a value to be a number?
    Not from this page. The converter applies one narrow rule and offers no type override; coerce the values after export if your code needs them numeric.
    What happens to nested JSON on the way back?
    That is the other direction. JSON to CSV flattens nested objects into columns such as address.city, and arrays are written as JSON text inside a cell.
    Will a field containing a comma be handled?
    Yes, if it is quoted. Quoted fields keep separators, embedded newlines and doubled quotes intact, and the output re-quotes only when a field would otherwise break.

    Share this converter

    More sharing options