Home Tools Blog About

Convert Text to CSV

In short

Convert plain text to RFC 4180 CSV (and back) with proper quoting, header rows, multiple delimiters. Free, offline, client-side, instant, secure.

  • Runs in your browser
  • Nothing uploaded
  • Free, no sign-up

Convert plain text to CSV with real RFC 4180 escaping - values containing commas, quotes, or newlines are properly wrapped and quote-doubled. Auto-detect the input delimiter or pick from tab / comma / semicolon / pipe / spaces. Reverse direction uses a stateful parser that handles quoted fields correctly.

Parsed table preview

Type to begin.
🛡
100% PrivateNo server uploads, ever
InstantRuns in your browser
💧
No WatermarksClean output, always
🆓
Free ForeverNo accounts, no limits

How to Use Convert Text to CSV

  1. Paste your text. Each line becomes a row, with values separated by whatever delimiter your text uses - tabs, commas, semicolons, pipes, or whitespace. Mixed values inside a single line are OK as long as the separator is consistent within that line.
  2. Pick or auto-detect the input format. Auto-detect looks at the first non-blank line and chooses tab > comma > semicolon > pipe > multi-space > single-space. Override if auto-detect picks wrong - for example a sentence with commas might be a single field, not a CSV row.
  3. Choose your output delimiter. Comma is standard CSV. Semicolon is the European/Excel default in locales where comma is the decimal separator. Tab gives you TSV (which avoids comma-in-data issues entirely). Pipe is common in legacy systems and database exports.
  4. Toggle the data-cleaning options. Skip blank lines (default on) drops empty rows. Trim whitespace (default on) strips leading/trailing spaces from each field. First-row-is-header marks the top row as the header in the table preview - it's still output as the first CSV row but rendered as <thead> in the preview.
  5. Watch the parsed table preview. Shows the first 50 rows of parsed data so you can verify the conversion before copying. Each column appears properly aligned. If the column count looks wrong, your input format detection is probably off - try a different one in the drop-down.
  6. Read the RFC 4180-escaped CSV output. Fields containing the output delimiter, double-quote, or a newline get wrapped in double-quotes; embedded quotes are doubled ("""). The stats line shows how many fields needed escaping. The output opens correctly in Excel, Google Sheets, LibreOffice, and any RFC 4180 parser.
  7. Swap for reverse. ⇄ flips to CSV → text. The reverse uses a stateful RFC 4180 parser that correctly handles quoted fields with embedded delimiters, escaped quotes, and newlines spanning multiple lines. Output is plain text rows joined by tabs, easy to paste into a spreadsheet or editor.

Frequently Asked Questions

Does this actually escape per RFC 4180?

Yes – for real, this time. Fields containing the output delimiter, a double quote, a carriage return, or a line feed get wrapped in double quotes; embedded quotes are doubled (say "hi""say ""hi"""). Many “text to CSV” tools skip this and produce broken CSV that breaks when a value has a comma in it. We don’t – the output passes through standard RFC 4180 parsers (Excel, Python csv module, Node csv-parse) without data corruption.

What does “auto-detect input format” actually check?

It scans the first non-blank line for delimiter characters in priority order: tab → comma → semicolon → pipe → multi-space (2+ consecutive spaces) → single space. Whichever appears first determines the input format. If your data is mixed (tabs on some lines, commas on others), auto-detect picks based on the first line – switch the drop-down to a specific format if that’s wrong.

What’s the difference between multi-space and single-space?

Multi-space splits only on runs of 2 or more spaces – useful when your data has fields like "New York" that contain a single space. John 30 New York (double spaces) becomes 3 columns: John / 30 / New York. Single-space splits on any space, so New York becomes 2 columns – usually not what you want unless your values are guaranteed space-free.

Can it parse CSV back to plain text?

Yes – click Swap. The reverse parser is a proper state machine: tracks “are we inside a quoted field?”, recognizes "" as an escaped quote inside a quoted field, allows commas and newlines inside quoted fields, and reports “unclosed quoted field” if the quote count is unbalanced. "Doe, Jr.",45,Boston parses to 3 fields, not 4.

What happens with European CSV (semicolons + decimal commas)?

Set input format to “Semicolon” and the parser splits on semicolons instead of commas – your decimal-comma values like 3,14 stay intact inside their fields. For output, pick “Semicolon (European CSV)” to round-trip cleanly to Excel in DE/FR/IT locales. The escaping logic uses the chosen output delimiter to decide what needs quoting.

What about “first row is header”?

Toggle it on and the table preview shows the first row as <thead> with styled header cells. The CSV output is unchanged – the header is still the first data row (that’s the RFC 4180 standard – headers aren’t a separate construct in CSV, they’re just the first row). The toggle is preview-only and survives Swap so reverse parsing also treats the first row as header in the preview.

What’s the input size limit?

200,000 characters. Beyond that the table preview slows browsers (each cell is a DOM node). The table itself caps at 50 displayed rows with a “Showing first 50 of N rows” note, but conversion processes the full input – only the preview is truncated. Copy and Download give you the complete output.

How does it handle BOM (byte order mark) in CSV input?

It doesn’t strip BOM specifically – BOM appears as a leading invisible character in the first field. If your CSV starts with  (BOM) followed by the actual data, the first parsed field will contain the BOM. Strip it from your source before pasting if needed, or untick “Trim whitespace” to see it exactly. Most modern CSV exports don’t include BOM unless explicitly requested for Excel compatibility.

Is my data uploaded anywhere?

No. All parsing, escaping, RFC 4180 state machine, and TSV/CSV serialization run in your browser. Open DevTools → Network and confirm zero requests fire – even when you Convert or Download. Safe for proprietary datasets, customer lists, or anything you’d rather not send to a third-party converter.

Does it work offline?

Yes. Total bundle is about 22 KB. Load once, disconnect, keep converting. The parser and serializer are pure JavaScript – no library dependencies, no fonts to fetch, no analytics. Useful for cleaning data on airgapped systems, planes, or anywhere a cloud-based converter wouldn’t reach.

Keep going

Related Tools

All Csv tools →
Share

Embed this tool

Add this free tool to your website. Copy and paste the code: