User Rating 0.0 โ˜…โ˜…โ˜…โ˜…โ˜…
Total Usage 0 times
Drop a .csv file here or browse Max 50 MB · UTF-8 encoded
Is this tool helpful?

Your feedback helps us improve.

โ˜… โ˜… โ˜… โ˜… โ˜…

About

Standard CSV files often contain unquoted fields. This creates parsing ambiguity when field values contain the delimiter character, newlines, or double-quote characters. A mishandled comma inside an address field will shift every subsequent column in the row. The qCSV (quoted CSV) format eliminates this class of error by wrapping every field in double quotes (") and escaping any internal quote as "", fully conforming to RFC 4180 ยง2 rules 5-7. This tool performs real character-by-character parsing using a finite state machine, not naive string splitting. It auto-detects your delimiter and handles embedded newlines, which most spreadsheet exports silently corrupt.

Limitations: this tool assumes UTF-8 input. BOM-prefixed files are accepted but the BOM is stripped from output. Fields containing binary data or null bytes will be preserved but may render incorrectly in the preview table. For files exceeding 1 MB, processing runs in a background thread to keep the interface responsive. Pro tip: if your downstream system chokes on quoted numerics, use the "Smart Quote" mode, which only quotes fields that contain the delimiter, quotes, or newlines.

csv converter qcsv quoted csv csv formatter rfc 4180 csv tool data conversion

Formulas

The CSV parser operates as a Finite State Machine with four states. Each input character c triggers a transition:

{
S0 = FIELD_START โ†’ if c = " then S2S1 = UNQUOTED โ†’ if c = delim then emit field, go S0S2 = QUOTED โ†’ if c = " then S3S3 = QUOTE_IN_QUOTED โ†’ if c = " then append " and go S2

The qCSV encoding function for each field f applies:

qCSV(f) = " + replace(f, ", "") + "

Where f is the raw field value, replace substitutes every occurrence of a double-quote character with two consecutive double-quote characters, and the result is wrapped in enclosing double quotes. The output row is then the concatenation of all encoded fields joined by the original delimiter delim.

Delimiter auto-detection counts occurrences of each candidate delimiter d โˆˆ {, ; \t |} across the first 5 lines, then selects the candidate with the lowest variance in per-line count and a non-zero mean, since a true delimiter appears consistently on every line.

Reference Data

ScenarioRaw CSV FieldqCSV OutputRule (RFC 4180)
Plain texthello"hello"ยง2 Rule 5 - fields may be quoted
Contains commaNew York, NY"New York, NY"ยง2 Rule 6 - must quote if delimiter present
Contains double quoteSay "hi""Say ""hi"""ยง2 Rule 7 - escape " as ""
Contains newlineLine1\nLine2"Line1\nLine2"ยง2 Rule 6 - must quote if CRLF present
Empty field(empty)""ยง2 Rule 5 - quoted empty
Leading/trailing spaces hello " hello "ยง2 Rule 4 - spaces are part of field
Numeric value42"42"Force-quote mode wraps all
Boolean-likeTRUE"TRUE"Prevents type coercion in Excel
Tab delimiter inputA\tB"A"\t"B"Delimiter preserved, fields quoted
Pipe delimiter inputA|B"A"|"B"Delimiter preserved, fields quoted
Mixed quotes and commasHe said, "ok""He said, ""ok"""Rules 6+7 combined
Unicode charactersๆ—ฅๆœฌ่ชž"ๆ—ฅๆœฌ่ชž"UTF-8 passthrough
Field with only quotes""""""""Each " becomes ""
CRLF line endingA\r\nB"A\r\nB"Embedded CRLF preserved inside quotes
Semicolon delimiterA;B"A";"B"European CSV style supported

Frequently Asked Questions

Standard CSV allows fields to be unquoted, which creates ambiguity when a field value contains the delimiter character, a newline, or a double-quote. qCSV (quoted CSV) wraps every field in double quotes and escapes internal quotes as "", per RFC 4180 ยง2. This eliminates parsing ambiguity entirely. Many enterprise ETL systems and database import tools require or strongly prefer fully-quoted CSV to avoid column-shift errors.
Some systems (notably Excel and Google Sheets) may interpret force-quoted numbers as text rather than numeric values. If your downstream consumer performs arithmetic on those columns, use the "Smart Quote" mode instead - it only quotes fields that contain the delimiter, double quotes, or newline characters. Purely numeric fields are left unquoted in that mode.
The parser recognizes both \n (LF, Unix/macOS) and \r\n (CRLF, Windows) as row terminators when they appear outside quoted fields. Inside a quoted field, embedded newlines of either type are preserved literally. The output uses the same line-ending style detected in the input. If mixed endings are found, CRLF is used by default for maximum compatibility.
The tool does not reject inconsistent files. It parses each row independently and quotes whatever fields are present. A warning toast appears indicating the row numbers with mismatched column counts (compared to the header row). This is intentional - many real-world CSV exports have trailing empty fields that get trimmed, and a strict rejection would be unhelpful.
Yes. The auto-detect algorithm analyzes the first 5 rows for candidate delimiters: comma (,), semicolon (;), tab (\t), and pipe (|). It selects the one with the most consistent per-line frequency. You can also override auto-detection by manually selecting the delimiter from the dropdown.
The tool accepts files up to 50 MB. Files larger than 1 MB are processed in a Web Worker background thread to keep the UI responsive. Processing speed depends on your device - expect roughly 5 - 15 MB/s on modern hardware. A progress bar is displayed during conversion.