GALAXY OF TOOLS

DEV SECTOR

CSV to JSON Converter

Convert CSV or TSV into a JSON array, arrays of rows or a keyed object — with numbers and booleans detected.

Parsed table

Runs entirely in your browser. Nothing you enter or upload is sent to a server.

Convert CSV to JSON accurately, even with messy data

The CSV to JSON converter turns spreadsheet exports, database dumps and reports into JSON you can use in code, APIs, fixtures and NoSQL databases. Paste CSV or load a .csv or .tsv file, and you get a JSON array of objects that uses the header row as keys — or an array of arrays, an object keyed by an ID column, or JSON Lines.

CSV looks simple until a value contains a comma, a quote or a line break. This converter uses a full RFC 4180 parser, so "Doe, Jane", "She said ""hi""" and multi-line addresses come through exactly right. It detects whether your file uses commas, semicolons, tabs or pipes, and turns 42, true and null into real JSON types while leaving values like 007 as text.

Your file is processed in your browser and never uploaded, so customer lists, payroll exports and other private spreadsheets stay on your device.

How to use the CSV to JSON Converter

  1. Paste CSV into CSV input, drop a file onto it, or press Load file.
  2. Leave Delimiter on Auto-detect, or choose comma, semicolon, tab or pipe yourself.
  3. Pick an Output shape. For “Object keyed by a column”, choose the Key column — usually an ID.
  4. Adjust the options: header row, type detection, trimming spaces, empty cells as null, and nesting of dot-named columns.
  5. Check the Parsed table and any warnings, then press Download JSON or Copy.

CSV to JSON Converter features

Real RFC 4180 parsing

Quoted fields, doubled quotes, delimiters and line breaks inside quotes, and CRLF or LF line endings are all handled correctly.

Delimiter auto-detect

Commas, semicolons (common in European Excel exports), tabs and pipes are detected from the structure of your first rows.

Careful type detection

Numbers, true/false and null become JSON types. Leading-zero codes such as 007 and integers too large for JavaScript stay as strings, so nothing is corrupted.

Four output shapes

Array of objects, array of arrays, an object keyed by any column, or JSON Lines for streaming and log tools.

Nested objects from dot keys

Columns like address.city or tags.0 can be rebuilt into nested objects and arrays — the reverse of JSON to CSV.

Helpful warnings

Rows with the wrong number of fields, stray quotes and duplicate keys are reported with line numbers.

How CSV values become JSON types

With “Detect numbers, booleans & null” switched on, each cell is converted using these rules. Switch it off to keep every value as a string.

CSV cellJSON valueWhy
42, -3.5, 1e642, -3.5, 1000000Valid JSON number syntax
007, +44 20, 1,234"007", "+44 20", "1,234"Leading zeros, signs and separators mean text
9007199254740993"9007199254740993"Beyond 253, so it would lose precision
true, FALSEtrue, falseCase-insensitive booleans
nullnullLiteral null
empty"" or nullYour choice with “Empty cells → null”

Tips for clean CSV to JSON conversion

  • Exported from Excel? Use File → Save As → “CSV UTF-8” so accented letters and symbols like ₹ and £ survive. A leading byte order mark is removed automatically.
  • Semicolons instead of commas? Excel uses the regional list separator, which is a semicolon in much of Europe. Auto-detect handles it.
  • Blank header cells become column_1, column_2 and so on, and repeated names get a suffix such as name_2, so no value is overwritten.
  • Phone numbers and ZIP codes that start with zero stay as strings. If you need every value as text, untick type detection.
  • Large files of several megabytes convert in well under a second. Live updating pauses above about 400 KB — press “Convert to JSON” instead.

CSV to JSON Converter FAQ

How do I convert a CSV file to JSON?

Press “Load file” and pick your .csv file, or paste its contents. The CSV to JSON conversion starts immediately: the first row is used as keys and each following row becomes an object. Press “Download JSON” to save the result.

What if my CSV has no header row?

Untick “First row is a header”. Columns are then named column_1, column_2 and so on, or choose “Array of arrays” to keep plain rows.

Why are some numbers still strings?

Values with leading zeros (like 007), thousands separators, plus signs or more digits than JavaScript can store exactly are kept as text on purpose, because converting them would change the data.

Can it handle line breaks inside a cell?

Yes. Any field wrapped in double quotes can contain commas, line breaks and doubled quotes, as defined by RFC 4180. The line numbers in the parsed table point to where each record starts.

Is my data uploaded anywhere?

No. Parsing and conversion run entirely in JavaScript in your browser. The file never leaves your device and nothing is stored after you close the page.

How do I go the other way, from JSON to CSV?

Use the JSON to CSV converter, and tidy or validate JSON first with the JSON Formatter.

You might also need