Tools

Home
JSON FormatterSQL FormatterJS ValidatorMinify CSS
Merge PDFCompress PDFImage to PDF
JPG to PNGPNG to WebPCrop Image

Prepend CSV Columns

Add a new column at the beginning of your CSV data with a custom name and default value

Your files never leave your browser
Column name:
Default value:
CSV Input0 chars, 0 lines
Drag & drop a CSV file here, or browse
Accepts .csv, .tsv, .txt files
CSV Output0 chars, 0 lines
Ready·

Drop in your CSV data and insert a new first column with one click — pick a name, set a default value or let it auto-number each row. Handles quoted fields, embedded commas, and multi-line values without breaking a thing. And everything runs in your browser. Nothing gets uploaded.

How It Works

Paste CSV
➤
Set Column Name & Value
➤
Download Result

The parser splits each row into fields (respecting quoted values), then inserts your new column at index zero. If a header row is present, it gets the column name; every data row gets either the default value you typed or an auto-incrementing number starting at 1. The rebuilt CSV is valid, properly escaped, and ready to import anywhere.

Examples

Adding an ID column to a customer list

Your CRM export has names and emails but no unique identifier. Leave the default value blank to auto-number each row.

INPUT
name,email Alice,[email protected] Bob,[email protected] Carol,[email protected]
OUTPUT
id,name,email 1,Alice,[email protected] 2,Bob,[email protected] 3,Carol,[email protected]

Tagging rows with a source label before merging

Two teams sent you sales data in separate files. Before combining them, you need a "source" column so you know which file each row came from. Set column name to "source" and default value to "team_west".

INPUT
product,units,revenue Widget A,340,8500 Widget B,120,3600
OUTPUT
source,product,units,revenue team_west,Widget A,340,8500 team_west,Widget B,120,3600

Adding a status column to a task tracker export

You pulled a backlog from Jira as CSV. The import template for the new tool requires a "status" column in position one. Set column name to "status" and default value to "open".

INPUT
task,assignee,priority Fix login bug,Maria,high Update docs,James,low Refactor API,Sarah,medium
OUTPUT
status,task,assignee,priority open,Fix login bug,Maria,high open,Update docs,James,low open,Refactor API,Sarah,medium

Who Uses This

💻 Developers

Adding primary key or index columns before database imports.

📊 Data Analysts

Tagging CSV exports with a source identifier before merging datasets.

💼 Project Managers

Inserting a status or category column into task exports for cross-tool migration.

🎓 Students

Formatting lab data or survey results to match a required submission template.

Common Mistakes

Forgetting to toggle "First row is header"

If your CSV has a header row and you don't check the toggle, the header gets a row number instead of the column name. Always check whether your first row is labels or data.

Pasting tab-separated data instead of CSV

Copying from Excel often gives you tabs, not commas. The tool expects comma delimiters. Convert to CSV first (File > Save As > CSV in Excel) or check for tabs in the output.

Running it twice and getting a duplicate column

If you paste the output back in and click Prepend again, you'll end up with two new columns. Double-check your input before running a second time — the output area is not the input area.

Technical Details

Frequently Asked Questions

What does "prepend" mean in CSV?

Prepend means to add something at the beginning. In this context, it inserts a new column before all existing columns — so it becomes the first (leftmost) column in every row of your CSV file.

How do I add a row number column to a CSV?

Paste your CSV, type a column name like "row_num" or "id", and leave the default value field empty. The tool auto-fills each row with an incrementing number starting at 1. It's the fastest way to add sequential IDs without opening a spreadsheet.

Can I add a column to the end instead of the beginning?

This tool specifically prepends (adds to the left). If you need to append a column to the right side, check the "Append CSV Columns" tool or "Insert CSV Columns" tool which lets you pick the exact position.

Does this work with large CSV files?

Yes. Since processing happens in your browser, the practical limit is your device's memory. Files with 50,000+ rows work fine on most machines. For files over a few hundred MB, a desktop script would be faster, but this handles typical exports without any issues.

Is my CSV data private when I use this tool?

Completely. Everything runs in JavaScript inside your browser tab. Zero data gets sent to a server. You can disconnect from the internet and it still works — that's the easiest way to verify for yourself.

Share: