Append CSV Column
Append a new column to any CSV file online. Upload CSV, define column data, preview results, and download the modified file instantly.
About
Manually editing CSV files in a text editor to insert a column is error-prone. A misplaced comma or an unescaped quote character corrupts the entire dataset downstream. This tool parses your CSV using an RFC 4180-compliant state machine, correctly handling quoted fields containing commas, newlines, and escaped double-quotes (""). It then appends your new column data to every row, preserving structural integrity. The parser auto-detects the delimiter by frequency analysis across the first 10 lines, supporting comma, semicolon, tab, and pipe separators.
Three fill modes are available: a single broadcast value applied to all rows, line-by-line values mapped 1:1 to existing rows, or an auto-increment sequence starting from any integer. Row count mismatches between your file and line-by-line input are handled by padding empty cells or truncating excess values. The tool processes files entirely in-browser. No data leaves your machine. Note: for files exceeding 50 MB, browser memory limits may apply depending on device RAM.
Formulas
The delimiter auto-detection algorithm counts occurrences of each candidate delimiter across the first N lines (default N = 10). The delimiter producing the most consistent column count wins:
Where d is a candidate delimiter, countsd is the array of per-line occurrence counts, and Ο is the standard deviation. Lower variance means more consistent column structure. The delimiter with the highest score is selected.
For the auto-increment fill mode, the value for row i is computed as:
Where start is the user-defined initial integer and step is the increment (default 1). Row indexing begins at 1 for data rows (header row receives the column name, not a number).
CSV field serialization follows RFC 4180: if a field contains the delimiter, a double-quote, or a newline, the entire field is wrapped in double-quotes, and any internal double-quote is escaped by doubling it (" β "").
Reference Data
| Delimiter | Symbol | Common Use | Auto-Detected | RFC 4180 |
|---|---|---|---|---|
| Comma | , | Default CSV standard | Yes | Yes |
| Semicolon | ; | European locales (Excel EU) | Yes | No |
| Tab | \t | TSV files, database exports | Yes | No |
| Pipe | | | Legacy systems, mainframes | Yes | No |
| Quoting | " | Wrap fields with delimiters | - | Yes |
| Escaped Quote | "" | Literal quote inside field | - | Yes |
| CRLF | \r\n | Windows line endings | Yes | Yes |
| LF | \n | Unix/macOS line endings | Yes | Accepted |
| CR | \r | Legacy Mac (pre-OS X) | Yes | Accepted |
| BOM | \uFEFF | UTF-8 BOM from Excel | Stripped | N/A |
| Empty Field | ,, | Null / missing data | - | Yes |
| Trailing Delimiter | a,b, | Extra empty last column | - | Ambiguous |
| Newline in Field | "a\nb" | Multi-line cell content | - | Yes |
| Max Columns | - | Browser memory limit | - | No limit |
| Encoding | UTF-8 | Universal standard | Assumed | Recommended |