Favorite places of your favorite city
Home
Add to preferred sources on Google

CSV to JSON Converter

Turn a CSV table into JSON without guessing which cells are numbers, booleans or null. Paste text or choose a local UTF-8 file, select objects or arrays, then copy or download the checked result.

Input

Paste CSV text, then choose the separator and output format.

Header names must be nonblank and unique, and data records must match their width.

Limits: 5 MiB per file, 5,000,000 UTF-16 units and 50,000 records.

JSON result

Convert CSV to see JSON here.

Conversion happens locally in your browser.

Convert a table without guessing data types

  1. Choose Pasted CSV or Local file. Files must use UTF-8 and a .csv, .tsv or .txt suffix, up to 5 MiB. Select the separator explicitly: comma is the default, with semicolon, tab and pipe available. A TSV filename does not automatically choose tab.
  2. Choose Objects to use the first record as exact header names, or Arrays to keep every record as data. Objects need unique, nonblank headers and matching row widths. Arrays keep variable row widths. Use example fills an identifier/name/active table and waits for Convert.
  3. Select Convert and read the data-record count, width information and actual UTF-8 output size. Conversion details connects the parsed fields to the chosen JSON representation. Copy JSON and Download JSON use the full result even when the preview is incomplete. Clear removes both sources and restores defaults.

Understand strings, headers and exact fields

Every cell stays a string, including 00042, 9007199254740993, true, false, null, empty fields and formula-looking text. There is no numeric precision conversion, null substitution, formula evaluation or nested structure inferred from a heading.

A separator inside double quotes stays within one field. Two doubled quotes become one quote, and embedded CRLF, LF or CR stays in the parsed string. Spaces are data. A stray quote, unclosed quote or text after a closing quote is rejected rather than repaired. A final record ending does not create a phantom row; further blank records are retained.

Object headers keep their exact spelling and whitespace, except that a name consisting only of trim whitespace is rejected. Exactly repeated names are rejected, but A and a or composed and decomposed accented names remain distinct. Names such as __proto__, constructor and 2 are ordinary flat keys. Emitted members follow column order; JSON receivers may enumerate object names differently.

Output uses two-space indentation, LF formatting and one final LF, encoded as UTF-8 without an added BOM. One leading UTF-8 file signature, or one leading pasted U+FEFF under this tool's policy, is consumed; additional U+FEFF remains content. UTF-16/32 signatures and malformed UTF-8 are not guessed or repaired. JSON escapes preserve embedded control characters rather than deleting them.

Examples of the two representations

The supplied three-record example has headers id, name and active, followed by two data records. Objects produces two objects and 150 UTF-8 bytes, keeping 00042 and the long identifier as strings. The quoted comma in A, B does not add a fourth column, and true remains the string true.

Arrays applied to the same example produces three arrays and 146 UTF-8 bytes. The first array contains id, name and active as values instead of using them as keys. A short row or a blank record is retained at its actual width in this mode.

A valid header-only input produces an empty JSON array with a final LF: three bytes and no data objects. That is a successful, exportable result, unlike an empty or signature-only source with no CSV records. A blank data record under a single-column header becomes an empty string; under a wider header it is a width error.

Input, output and preview bounds

Files are limited to 5242880 bytes. Decoded or pasted text must fit 5000000 UTF-16 units, 50000 physical CRLF/LF/CR sequences including quoted content, 50000 logical records including a header, 256 columns per record and 2000000 parsed cells. CRLF counts as one physical ending. These are explicit resource limits, not visible-character counts.

The complete formatted JSON must fit 16777216 UTF-8 bytes. A worker operation exceeding 15000 milliseconds is terminated without a partial download. Repeated long headers and escaped controls can make an otherwise admitted CSV exceed the output limit. Limits do not guarantee memory use or speed on every device.

The default JSON preview shows at most 100000 Unicode scalar characters and clearly marks an incomplete preview. Full current Copy and download retain every accepted field. Clipboard denial exposes the full current readonly text for manual copying, not merely the prefix. Method field previews can also be shortened without changing export.

This version has no URL input, separator auto-detection, type inference, comments, directive removal, CSV repair or legacy-encoding conversion. RFC 4180 describes a common CSV format, not every producer's dialect. Malformed UTF-16 is rejected, and browser or clipboard normalization that happened before pasting cannot be reversed.

Local conversion and current output

This tool adds no document upload, account, saved history, logging or data-bearing share URL. Editing, switching sources or options, choosing a replacement, cancelling or clearing retires the old result. Existing site services remain separate; local processing is not their certification or a secure-erasure guarantee.

Questions about CSV to JSON

This converter deliberately retains every cell as a string. It does not guess types, so leading zeros and large identifiers remain intact. If your receiving system needs other types, apply an explicit schema there rather than assuming this tool inferred one.

Object mode needs nonblank, exactly unique header names so no column is silently overwritten. It also needs every data record to match that width. Arrays mode treats the first record as ordinary data instead and does not require header names.

No. A blank record is one empty-string cell. Arrays keeps it at that width. Objects accepts it under a single-column header but reports a mismatch under a wider header. An ordinary final record terminator alone does not add another blank record.

No. Choose or create a UTF-8 CSV, TSV or text file. The tool uses fatal decoding and rejects conflicting UTF-16/32 signatures or invalid UTF-8 instead of guessing. Valid UTF-8 NUL characters are retained as JSON-escaped data, not treated as automatic encoding evidence.

No. It remains an ordinary flat JSON member name, not a prototype assignment, function or nested path. Emitted numeric-looking keys follow CSV column order, although a downstream JSON receiver may enumerate object names differently.

No. Preview limits only bound the displayed prefix and example fields. The full checked JSON is used for Copy and Download. If input, output or processing exceeds a limit, conversion fails with no partial export rather than claiming that a shortened result is complete.

Sources and format references

JSON to CSV Converter

Convert flat JSON records to delimited text with first-seen columns, original number spellings and explicit empty-value rules.

Open tool — JSON to CSV Converter

CSV Delimiter Converter

Convert CSV separators, preview real columns and spot import problems. Works locally with CSV, TSV and text; values remain unchanged.

Open tool — CSV Delimiter Converter

Compare Two CSV Files

Match rows by a key column and find added, removed and changed records.

Open tool — Compare Two CSV Files

CSV Duplicate Finder & Remover

Find exact duplicate CSV rows or repeated IDs. Review conflicting values, keep original data and download retained, removed and unresolved records.

Open tool — CSV Duplicate Finder & Remover

CSV Merger

Combine rows from several CSV files by exact column name. Preview alignment and download CSV with a merge report.

Open tool — CSV Merger

CSV Splitter

Split a CSV by rows or exact file size. Keep headers and download each part.

Open tool — CSV Splitter
View all tools in this category