>_
smartdevbox
Try SmartDevBox free — no sign-up91+ tools · 100% client-side · no account required
Glossary

What Is CSV?

CSV (Comma-Separated Values) is a plain-text format for tabular data: each line is a row, and fields within a row are separated by commas. Simple in concept, CSV is deceptively tricky in practice — quoting rules, line endings, encoding, and delimiter variations have tripped up every developer at least once.

The One-Line Definition

CSV is a plain-text format where each line represents a data record and fields within each record are separated by commas. Documented (but not strictly standardised) in RFC 4180.

A CSV Example

id,name,email,active
1,Ada Lovelace,ada@example.com,true
2,"Smith, John",john@example.com,false
3,Grace Hopper,"grace@example.com",true

The Rules (RFC 4180)

DelimiterA comma , separates fields. Tabs, semicolons, or pipes are used in TSV/DSV variants.
One row per lineEach record occupies one line. Line endings may be CRLF (Windows) or LF (Unix).
Optional headerThe first row is conventionally a header naming each column, but this is not required.
QuotingFields containing a comma, double-quote, or newline must be enclosed in double quotes: "Smith, John".
Escaping quotesA double-quote inside a quoted field is escaped by doubling it: "He said ""hello""".
WhitespaceWhitespace around an unquoted field is technically part of the field value. Parsers vary in how they trim it.
EncodingCSV has no encoding declaration. UTF-8 is recommended; Excel may produce Windows-1252 or UTF-16 with a BOM.

CSV vs TSV

CSV — comma delimiterMost widely supported. Problematic when data contains commas (addresses, text). Requires quoting with double-quotes.
TSV — tab delimiterLess ambiguous for text data — tabs rarely appear in natural language. Preferred for copy-paste from spreadsheets. Less universally supported than CSV.

The Encoding Gotcha

CSV has no encoding header. Files exported from Microsoft Excel may use Windows-1252 encoding (breaking non-ASCII characters) or UTF-16 with a BOM. Always specify UTF-8 when exporting and validate the encoding before parsing.

Convert CSV Now

CSV to JSON → · JSON to CSV → — all conversions run in the browser.

Frequently Asked Questions

How does CSV handle commas or newlines inside a field?

Wrap the field in double quotes: "Smith, John". A double-quote inside a quoted field is escaped by doubling it: "He said ""hello""".

What is the difference between CSV and TSV?

TSV uses a tab as delimiter instead of a comma. Tabs appear less often in data than commas, making TSV less ambiguous for text-heavy data.

How do I convert CSV to JSON online?

Paste your CSV into SmartDevBox. The CSV to JSON tool uses the header row as property names and returns a JSON array — all client-side.

CSV to JSONConvert CSV to a JSON array using the header row as property names.
JSON to CSVFlatten a JSON array of objects to CSV.
What Is JSON?The alternative format to CSV for structured data in APIs.