The method
A format change, with explicit boundaries
Celljson accepts one rectangular comma-separated document. A finite-state parser recognizes a field start, an unquoted field, a quoted field and the position after a closing quote. A comma ends an unquoted field. A record separator ends a record. Every record must have the width established by the first record.
Quotes, spaces and line breaks
A quote can only begin a field. Inside a quoted field, two consecutive quotes produce one literal quote. Commas and line breaks inside quotes are data. After a closing quote, only a comma, record separator or end of input is accepted. Spaces are significant: a space before a quote makes it an unquoted field with an unsupported embedded quote. A space after a closing quote is also rejected. Nothing is trimmed.
Outside quotes, CRLF and LF record separators are accepted; a lone CR is rejected. One terminal record separator does not add a phantom record. Additional blank records contain empty fields and still need the correct width. A trailing comma creates an empty final field.
The browser input boundary
The parser preserves line breaks present in the JavaScript string it receives. A browser textarea may normalize pasted CRLF or CR line endings before conversion. This tool cannot reconstruct the original clipboard or file bytes. A direct-parser CRLF example describes the parser model; it does not promise that pasting a file preserves its original line endings.
Two output shapes, always strings
Array mode retains every record, including the first. Header mode uses the first record as exact, case-sensitive header names and emits objects for the remaining records. Empty or duplicate headers reject. Header-only input produces []. Leading zeroes, empty fields and words such as true or null remain JSON strings. Duplicate data records stay present.
Prototype-like headers such as __proto__ are literal own data properties. Original header order is retained in downloadable notes and the preview. JSON object order is not a semantic guarantee; numeric-looking keys can serialize in a different order. Use arrays when column sequence itself is important.
Resource bounds and output expansion
Input is limited to 200,000 UTF-16 code units, 5,000 total records including a header, 100 columns and 20,000 units in one decoded field. Valid Unicode scalar text is required; unpaired surrogates and unsupported control characters reject. One optional initial BOM is recognized and reported. These are product limits, not universal CSV rules.
Pretty JSON uses two-space indentation. Before constructing all object records or the complete serialized document, the tool predicts its exact code-unit length from escaped cell and header lengths plus punctuation and indentation. Above 1,000,000 units it rejects without clipping. Repeating a long header on many object records can expand output far beyond the input size. The preview shows at most 100 data records per page; copy and download include the full current result.
Local conversion and page telemetry
Cloudflare Web Analytics is active for page-usage and performance telemetry on this host. The converter does not build pasted CSV into analytics events, URLs or remote conversion requests. No advertising or consent-platform loader is active. Hosting requests remain separate from the local conversion; read the privacy page for details.
Sources and scope
RFC 4180 describes common comma, header and quoting conventions and acknowledges variation. RFC 8259 defines JSON values, escaping and interoperable object names. This converter deliberately supports a bounded subset. It does not detect delimiters, infer types, validate a downstream schema, repair spreadsheets or execute formulas.