Skip to content
Simple Tools

Practical guide

How to convert CSV or TSV to JSON

A wrong delimiter or automatic conversion of code 001 into a number can alter an export’s meaning. This guide covers explicit-delimiter importing, where every cell becomes a string and the table structure is checked before JSON is produced.

Simple Tools editorial teamReviewed: 2 October 2026

Paste text and specify the delimiter

Paste a table with its header in the first record, choose comma, semicolon or tab and select “Process”. The delimiter is not detected automatically. If everything becomes one column, check the selection before copying output. Selecting semicolon does not convert decimal commas to decimal points.

The tool accepts text, not a file or workbook. Spreadsheet clipboard data often uses tabs between columns; match the actual input. Polish characters such as Łódź remain text. Fix incorrectly decoded characters at the source; the converter cannot reconstruct an earlier encoding.

Every cell becomes a string

The example retains 001, true and null as strings, not a number, boolean or null value. An empty cell becomes "". Cell whitespace remains too. This deliberate rule avoids guessing but requires later explicit type mapping under the destination’s data contract.

Copying returns a JSON array of objects without an added label. A header with no data records yields []. Successful conversion is not API schema approval. Establish separately which members are required, whether empty strings are allowed and how missing data should be handled.

Semicolon: retained string values
CSVJSON
code;active;value;city 001;true;null;Łódź[ {"code": "001", "active": "true", "value": "null", "city": "Łódź"} ]
code;note 001;[ {"code": "001", "note": ""} ]
code;note[]

Quotes and multiline cells

Wrap a field containing a delimiter, quote or line break in double quotes. Double a quote within a quoted field: "A ""B""". Do not split text at every newline: one quoted cell can span several lines.

This implementation accepts LF and CRLF between records and one initial BOM. A lone CR outside a quoted cell, an unclosed quote or text after a closing quote causes an error. Quoting follows RFC 4180 principles; Unicode, LF, semicolon and tab extend that profile.

Headers and record widths must match

Headers are mandatory, nonempty and unique. Names are not trimmed, so code and code followed by a space are different keys. Each data record needs exactly as many columns as the header. Do not repair an error by deleting a delimiter that belongs inside a value.

Blank records are not automatically skipped. An extra blank line can produce an empty record or a width error, while one terminal newline does not add a record. The name __proto__ remains a normal serialized JSON key; conversion does not use it to mutate an object prototype.

Limits and safe use of output

Input is limited to 50,000 UTF-16 units and output to 500,000. Simultaneous limits are 1,000 data records, 100 columns and 10,000 data cells; the header is not a data record. Repeated long member names can enlarge JSON past the output cap even from a small CSV.

Unpaired Unicode surrogates are rejected. An error is not partial success: correct the data or split it into complete tables with headers. =1+1 is an ordinary JSON string but may become a formula again after spreadsheet export; conversion is not sanitization.

Privacy, copying and reset

Use a short anonymized sample instead of a complete production export. The tool processes input and output in the browser, without sending them to analytics or saving history in localStorage or sessionStorage. Loading the page still connects your device to hosting. Browser extensions and clipboard access remain outside this protection.

Editing a field clears the old result: select “Process” again to produce the current version. Copying is a separate action. Reset restores initial settings but cannot remove earlier clipboard copies, files or printouts. Report issues using a short synthetic example and expected result rather than confidential data.

Frequently asked questions

Why is 001 a string?

Every cell becomes a string to avoid type guessing and lost zeros. Change types explicitly under destination rules.

Can I omit the header?

No. The first record defines member names. Without a header, the first data record would be interpreted as one.

Why does a JSON → CSV → JSON round trip change types?

CSV carries no per-cell type. Import returns strings and cannot restore distinctions between null, absent members and empty strings.

Does reset remove copied output?

No. It resets the form; earlier clipboard copies, files or printouts need separate removal.

Sources and scope

Examples are synthetic and limits describe this implementation, not universal format requirements. Verify output in its destination system. This guide does not establish API, schema or business-rule compliance and is not a substitute for a security review.

Tools covered by this guide

Generator

JSON to CSV converter

Convert a flat JSON object array to CSV or TSV, with explicit rules for empty cells and formula-like text.

Generator

CSV to JSON converter

Convert CSV or TSV with a header to a JSON object array without guessing cell types.

Calculator

Unix timestamp converter

Convert Unix seconds or milliseconds to UTC and Warsaw time, or an explicitly offset date to a timestamp.