User Rating 0.0 β˜…β˜…β˜…β˜…β˜…
Total Usage 0 times
Drop CSV file here or click to browse Supports .csv and .tsv files
Is this tool helpful?

Your feedback helps us improve.

β˜… β˜… β˜… β˜… β˜…

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.

csv append column csv editor add column csv csv tool data manipulation spreadsheet

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:

scored = 11 + Οƒ(countsd)

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:

valuei = start + (i βˆ’ 1) Γ— step

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

DelimiterSymbolCommon UseAuto-DetectedRFC 4180
Comma,Default CSV standardYesYes
Semicolon;European locales (Excel EU)YesNo
Tab\tTSV files, database exportsYesNo
Pipe|Legacy systems, mainframesYesNo
Quoting"Wrap fields with delimiters - Yes
Escaped Quote""Literal quote inside field - Yes
CRLF\r\nWindows line endingsYesYes
LF\nUnix/macOS line endingsYesAccepted
CR\rLegacy Mac (pre-OS X)YesAccepted
BOM\uFEFFUTF-8 BOM from ExcelStrippedN/A
Empty Field,,Null / missing data - Yes
Trailing Delimitera,b,Extra empty last column - Ambiguous
Newline in Field"a\nb"Multi-line cell content - Yes
Max Columns - Browser memory limit - No limit
EncodingUTF-8Universal standardAssumedRecommended

Frequently Asked Questions

The parser implements an RFC 4180 state machine. When it encounters an opening double-quote, it enters a "quoted" state where commas, newlines, and other delimiters are treated as literal characters within the field. The field closes only when it encounters a closing double-quote followed by a delimiter or end-of-line. Internal double-quotes must be escaped as "".
Rows in the CSV that have no corresponding value in your input receive an empty cell for the new column. The tool never drops or skips existing rows. Conversely, if you provide more values than there are data rows, the excess values are ignored and a warning is displayed showing the mismatch count.
It can if your file has fewer than 2 rows or if a non-standard delimiter is used inconsistently. The algorithm scores candidates by variance of per-line counts. If all candidates score equally (e.g., a single-column file), it defaults to comma. You can always override the detected delimiter manually using the dropdown.
CSV injection is a known risk where cells starting with =, +, -, or @ are interpreted as formulas by spreadsheet software. This tool provides an optional sanitization toggle that prepends a single-quote (') to such cells in the new column only. Existing data columns are not modified.
There is no hard-coded limit. Processing depends on browser memory. Files up to 50 MB parse comfortably in modern browsers with 4 GB+ RAM. For files exceeding 100 MB, Chrome may show a memory warning. The tool streams the file through the FileReader API, but the full parsed array must reside in memory during manipulation.
This tool appends one column per operation. To add multiple columns, download the result and re-upload it for each additional column. This deliberate single-column approach prevents mapping ambiguity and lets you verify each addition via the preview table before committing.