Prepend CSV Columns
Add new columns to the beginning of your CSV data. Each new column appears before all existing columns, pushing the original data to the right. Useful for adding identifiers, row numbers, or category labels at the front of a dataset.
Input CSV
Options
Output CSV
What It Does
Add new columns to the beginning of your CSV data. Each new column appears before all existing columns, pushing the original data to the right. Useful for adding identifiers, row numbers, or category labels at the front of a dataset.
How It Works
Prepend CSV Columns produces new output from rules, parameters, or patterns instead of editing an existing document. That makes input settings more important than input text, because the settings are what define the shape of the result.
Generators are only as useful as the settings behind them. When the output seems off, check the count, range, delimiter, seed values, or pattern options before judging the result itself.
All processing happens in your browser, so your input stays on your device during the transformation.
Common Use Cases
- Add a row ID column as the first column of a dataset
- Prepend a source identifier when merging files from multiple systems
- Add a date stamp column to the front of periodic exports
- Insert a category or group label before existing data columns
- Add a batch number column for tracking data processing runs
How to Use
- Paste your CSV data into the input area.
- Enter the header name for the new column.
- Optionally enter a default value to fill all rows.
- Click Prepend and copy the result.
Features
- Adds columns at position 1, before all existing data
- Set custom header names
- Fill with default values or leave empty
- Prepend multiple columns at once
- Maintains all existing data unchanged
Examples
Below is a representative input and output so you can see the transformation clearly.
name,age,city Ada,36,London Lin,29,Berlin
id,name,age,city 1,Ada,36,London 2,Lin,29,Berlin
Edge Cases
- Very large inputs can still stress the browser, especially when the tool is working across many columns. Split huge jobs into smaller batches if the page becomes sluggish.
- Empty or whitespace-only input is technically valid but may produce unchanged output, which can look like a failure at first glance.
- If the output looks wrong, compare the exact input and option values first, because Prepend CSV Columns should be repeatable with the same settings.
Troubleshooting
- Unexpected output often means the input is being split or interpreted at the wrong unit. For Prepend CSV Columns, that unit is usually columns.
- If a previous run looked different, check for hidden whitespace, changed separators, or a setting that was toggled accidentally.
- If nothing changes, confirm that the input actually contains the pattern or structure this tool operates on.
- If the page feels slow, reduce the input size and test a smaller sample first.
Tips
When prepending a source identifier to distinguish merged files, use a unique value per file (like the filename or export date) so you can trace each row back to its origin.
Frequently Asked Questions
Can I prepend multiple columns at once?
Yes. Specify multiple header names and they will all be added at the beginning. The first name in your list becomes column 1, the second becomes column 2, and so on.
Does prepending change the existing column positions?
Yes. All existing columns shift to the right by the number of new columns added. If you prepend 2 columns, the original column 1 becomes column 3.
Can I prepend with different values per row?
The tool fills all rows with the same default value. For row-specific values, prepend an empty column and fill it manually afterward.
How is this different from the Append tool?
Prepend adds columns at the beginning (position 1). Append adds columns at the end (after the last existing column). The data modification is structurally identical; only the position differs.
Will prepending affect my header row?
Yes. The new column header is added as the first cell of the header row, and all other headers shift right.
Can I prepend a column with auto-incrementing row numbers?
Not directly. This tool inserts static values. For auto-incrementing numbers, prepend an empty column and use a separate tool or script to fill it with sequential values.