technine.io

Tools

CSV to JSON Converter

Convert quote-aware CSV into an array of objects, an array of arrays or JSON Lines in your browser, with explicit header, delimiter and value-type choices.

Files and pasted data are processed in this browser. Their names and contents are not sent to a conversion server, added to the URL or stored in browser storage.

Source data

Drop a file here

One file up to 10 MB, or up to 1 MB of pasted UTF-8 text. Results may contain at most 100,000 records, 250 columns and 1,000,000 cells. Preview: 100 rows × 30 columns.

Input and shape settings

BOM-marked UTF-8 and UTF-16 are detected automatically. Choose a legacy encoding only when strict UTF-8 cannot decode the file.

JSON output

This converter first parses CSV as rows so that blank headers, repeated headers and uneven records remain visible. With a header row, id,name followed by 001,"Lee, Ada" can become [{"id":"001","name":"Lee, Ada"}]. The default keeps 001 as a string rather than silently changing an identifier to the number 1.

How to use this tool

  1. Choose a file up to 10,000,000 bytes or paste up to 1,000,000 UTF-8 bytes. Confirm any explicit legacy encoding and the comma, tab, semicolon or pipe delimiter.
  2. Choose whether the first record is a header. Blank or duplicate headers block object-shaped output until you explicitly trim, fill blanks as column_N or add collision-safe suffixes to duplicates.
  3. Select an array of objects, an array of arrays or JSON Lines. CSV values remain strings unless you enable conservative inference for exact lowercase booleans, null and eligible finite numbers.
  4. Review the table shape, inferred values and output size, then copy a result up to 1,000,000 bytes or download valid JSON up to 50,000,000 bytes. Header-only object input can produce an empty array.

Ways to use it

Prepare spreadsheet rows for an API
Use the header as object keys and turn each data record into one JSON object without losing leading zeroes by default.
Convert open data for a script
Read quoted fields and a chosen delimiter, then download a JSON array that application code can parse.
Create row-oriented JSON Lines
Write one object per non-empty line for a workflow that accepts NDJSON, after resolving headers and table shape.
Keep a headerless table as rows
Choose an array of arrays when the first record contains data rather than field names, avoiding invented object keys.

Supported files and limits

  • Input, table, field, preview and output limits match the CSV Cleaner: 10,000,000 file bytes, 1,000,000 pasted UTF-8 bytes, 100,000 records including a header, 250 columns, 1,000,000 cells, 1,000,000 decoded characters in one field and 50,000,000 output bytes.
  • Object-shaped JSON needs usable unique headers. Blank and duplicate names are not silently discarded or overwritten; you must choose how they are repaired before conversion.
  • Every CSV value stays a string by default. Conservative inference does not infer dates, empty values, NaN, Infinity, unsafe integers or numbers with leading zeroes, and it rejects numeric candidates with more than 15 significant digits.
  • Inference can still change meaning: false becomes a boolean, null becomes null and 1e3 becomes a number. Check the highlighted conversions before download.
  • Strict rectangular shape is the default. Rectangularising pads missing cells and creates headers for extra columns when needed, but it cannot determine what a missing value should have been.
  • Whitespace, quoting, delimiters and line endings from the CSV are not represented in JSON. Converting the JSON back to CSV does not recreate an identical source file.
  • A header-only CSV may produce [] for object-shaped output; empty input, malformed CSV, invalid encoding, malformed quotes, NUL data or exceeded limits produces no download.
  • Conversion takes place in this browser without sending the file, pasted CSV, filename, headers or JSON output to a conversion server. Do not expose secrets through extensions, clipboard history, screen sharing or the downloaded file.

Common questions

How does the CSV header become JSON keys?

When the first-record-as-header option is selected, each header cell becomes a key and every following record becomes an object. Blank or repeated headers must be repaired explicitly before object or JSON Lines output.

Are CSV numbers and booleans converted automatically?

No. All cells stay strings by default, so 001 remains “001”. Optional conservative inference converts only exact lowercase true, false and null, safe integers without leading zeroes, and finite decimal or exponent forms with no more than 15 significant digits.

Can I produce an array of arrays instead of objects?

Yes. Array-of-arrays output preserves the table as rows and does not require a header. It is useful when the first record contains data or when duplicate headings must remain untouched.

Does it support quoted commas, delimiters and line breaks?

Yes, when the CSV quoting is valid. Double-quoted fields may contain the selected delimiter, doubled quotes and CRLF, LF or CR line breaks. These become string content in JSON.

What happens when CSV rows have different lengths?

Strict shape reports the affected logical record numbers and blocks output by default. Rectangularising is optional: it pads short rows, keeps every extra cell and creates headers for additional columns where object output needs them.

Can the converter create JSON Lines or NDJSON?

Yes. JSON Lines writes one object on each non-empty line, so it requires a valid unique header. It does not create row-array JSON Lines in this release.

Will CSV to JSON and back reproduce the original file?

No. JSON does not retain the source delimiter, quoting style, line endings or header formatting, and optional inference changes some strings into typed values. Treat each conversion as a new representation of the table.

Does the converter upload my CSV?

No. Decoding, parsing and conversion run in the page worker in this browser. The workflow does not send or store the file, filename, CSV values, headers, errors or output.

ConsultWhatsApp