TsWorks Tools
All tools (39)

CSV to JSON

Convert CSV or TSV into JSON, with headers and real types.

Delimiter
Indent

Off keeps every value a string, which preserves leading zeros.

Paste CSV or TSV. Quoted fields, embedded commas and newlines are handled.

CSV to JSON

Paste CSV, TSV or any delimited text and get JSON. The delimiter is detected from the first line, so exports from Excel, Sheets and European locales all work without configuration.

Quoting is handled properly

Splitting a CSV line on commas breaks the moment a field contains one. This uses a real RFC 4180 parser, so"Hopper, Grace" stays one field, "" inside a quoted field is a literal quote, and a newline inside quotes does not start a new record. Both LF and CRLF line endings are accepted.

Type conversion, and when to turn it off

With convert numbers and booleans on,42 becomes a number, true becomes a boolean and an empty cell becomes null. Turn it off when your data has identifiers that only look numeric - product codes, postcodes and phone numbers lose their leading zeros otherwise. Integers too large for JavaScript to represent exactly are left as strings either way, rather than being silently rounded.

Without a header row

Untick first row holds column names and you get an array of arrays instead of an array of objects - useful when the file genuinely has no header, or when you want positional data.

Related tools