CSV to Multiline Converter
Convert CSV data to multiline text format instantly. Parse comma, semicolon, tab, or pipe-delimited files into readable line-by-line output.
About
CSV files encode tabular data as delimiter-separated values per RFC 4180. Mishandling quoted fields, embedded newlines, or escaped double-quotes ("") during conversion silently corrupts output. A naive split on commas destroys any field containing , within quotes. This tool implements a finite-state-machine parser that correctly resolves all edge cases defined in the RFC specification. It supports four delimiter types: comma (,), semicolon (;), tab (\t), and pipe (|).
The converter transforms each CSV row into a multiline block where every field occupies its own line. Optional header labeling prepends column names to each value. This is useful for converting dense spreadsheet exports into human-readable reports, log entries, or configuration files. Note: this tool operates entirely client-side. No data leaves your browser. Maximum practical file size depends on available browser memory, typically 50MB for modern browsers.
Formulas
The CSV parser operates as a finite state machine with three states:
State transitions on character c at position i:
Where delim โ {, ; \t |}. The parser scans the input string in O(n) time with a single pass, where n is the character count of the input.
Reference Data
| Delimiter | Symbol | Common Sources | RFC Standard | Risk if Mishandled |
|---|---|---|---|---|
| Comma | , | Excel, Google Sheets, most databases | RFC 4180 | Breaks on currency values like 1,000.00 |
| Semicolon | ; | European Excel exports (locale-dependent) | No formal RFC | Misidentified as comma-delimited |
| Tab | \t | TSV files, database dumps, clipboard paste | IANA text/tab-separated-values | Invisible character causes silent parse errors |
| Pipe | | | Legacy mainframe exports, HL7 medical data | No formal RFC | Rare in field data, low collision risk |
| Double-quote escape | "" | Any quoted CSV field containing quotes | RFC 4180 ยง2.7 | Unescaped quotes break field boundaries |
| Quoted newline | \n inside "..." | Address fields, descriptions, notes | RFC 4180 ยง2.6 | Row count mismatch if split on newline |
| BOM marker | \uFEFF | UTF-8 files from Windows Notepad | Unicode ยง2.13 | Corrupts first field name |
| CRLF line ending | \r\n | Windows-generated files | RFC 4180 ยง2.1 | Extra blank lines in Unix environments |
| Empty fields | ,, | Sparse datasets, optional columns | RFC 4180 ยง2.4 | Off-by-one column alignment errors |
| Trailing delimiter | a,b,c, | Some database exports | Not standard | Creates phantom empty last column |
| Mixed quoting | a,"b",c | Hand-edited CSV files | RFC 4180 ยง2.5 | Inconsistent but valid per spec |
| UTF-8 encoding | Multi-byte chars | International datasets | RFC 3629 | Mojibake if decoded as Latin-1 |