Simple online tools for developers, networking, text and conversions.

Text Tools

Replace a CSV Column

Replace one selected CSV column with a new header and new values.

Tool

Use this tool to replace one CSV column by header name or 1-based column number. It is useful for fixing bad data, swapping out outdated fields, and rebuilding a column without editing every row manually.

About this tool

Use this tool to replace one CSV column by header name or 1-based column number. It is useful for fixing bad data, swapping out outdated fields, and rebuilding a column without editing every row manually.

Use replace a csv column when you need a fast browser-based result without extra setup. It works well for quick checks, one-off tasks, and routine formatting or calculation work.

Learn more

Why use this tool

How to use

  1. Put the column name or 1-based column number on line one
  2. Put the new header on line two
  3. Put one replacement value per CSV row after that
  4. Leave a blank line
  5. Paste the CSV and run the tool

Examples

Example

Input

email
username
john
anna

name,email,role
John,john@example.com,admin
Anna,anna@example.com,editor

Output

name,username,role
John,john,admin
Anna,anna,editor

Useful when replacing a whole field instead of deleting and inserting separately.

Example

Input

2
status
active
pending

id,title,role
1,Book,admin
2,Pen,editor

Output

id,status,role
1,active,admin
2,pending,editor

Supports both header-based and index-based column selection.

Common errors

Using a column that does not exist

Fix: Check the CSV header or use a valid 1-based column number.

The replacement values count does not match the row count

Fix: Provide one replacement value for each CSV data row.

Forgetting the blank line before the CSV body

Fix: Put selector, new header, and values first, then a blank line, then the CSV.

FAQ

What does Replace a CSV Column do?

It replaces one selected column with a new header and new values.

Can I select the column by name?

Yes. You can use either the exact header name or a 1-based column number.

Do I need one replacement value per row?

Yes. The number of replacement values should match the number of CSV data rows.

Does it change other columns?

No. It only replaces the selected column.

How is it different from Delete plus Insert?

Replace does both operations in one step and keeps the same column position.

Use cases

Related tools