SmartQueryTools

Rename Columns in CSV Files Online

Rename columns in CSV files instantly in your browser. No upload, no server — your data stays on your device.

How to rename Columns in CSV files

  1. Drop your file onto the upload area. Every column is listed with its current name on the left and an editable box on the right.
  2. Type a new name into the box for each column you want to change. Edited boxes are highlighted. Leave the others as they are.
  3. Click Apply Renames. The button stays disabled until at least one name differs from the original.
  4. Check the preview, then click Download to save the file with the new headers in the same format.

Your file is processed locally in your browser and is never uploaded. The free limit is 50 MB per file; larger files work if your device has the memory for them.

Worked example

A customer survey tool exports question text as column headers. The analyst wants short snake_case names before loading the results into a database.

Input (CSV)

Respondent ID,Q1: How satisfied are you?,Q2: Would you recommend us?,Submitted At
1,4,true,2026-06-02
2,2,false,2026-06-02
3,5,true,2026-06-03

Settings

  • Respondent ID → respondent_id
  • Q1: How satisfied are you? → satisfaction
  • Q2: Would you recommend us? → would_recommend
  • Submitted At → submitted_at

Result

respondent_idsatisfactionwould_recommendsubmitted_at
14true2026-06-02
22false2026-06-02
35true2026-06-03

Only the headers change. Every value, the row order and the column order stay exactly as they were, and each column keeps its type: the scores remain integers and the recommend answers remain booleans. Names without spaces or punctuation can be used in SQL without quoting.

Working with CSV files

In a CSV the column names are just the first line of the file, so renaming rewrites that line and leaves the data rows alone. If the file has no header row, the engine usually notices, because the first line has the same types as the rest, and names the columns column0, column1 and so on. You can then give them real names here. When every column is text, it cannot tell, and the first data row becomes the header. Duplicate headers get a suffix such as name_1 on load, and this is the place to give them proper names.

Any text is allowed in a new name. If a name contains a comma or a double quote, it is wrapped in quotes in the header line so the file stays valid. Spaces at the start or end of a typed name are removed. If you clear a box completely, that column keeps its original name rather than getting a blank header. The data rows are written back exactly as parsed.

Frequently Asked Questions

Can I use spaces or punctuation in CSV column names?

Yes. Names with commas or quotes are quoted in the header line automatically. For files headed to a database, letters, digits and underscores are the safest choice.

My CSV has no header row. Can I add one here?

Often, yes. When the first line looks like data, such as numbers under numeric columns, the columns are named column0, column1 and so on, and you can rename them. If all columns are text, the first row is taken as the header, so add a header line in a text editor first.

What happens if I give two columns the same name?

Column names must be unique, so the engine adds a numeric suffix to the repeated name, for example total and total_1. Check the preview before downloading.

What if I clear a name box completely?

An empty box is ignored and that column keeps its original name. Leading and trailing spaces in a typed name are also removed.

Does renaming change any data?

No. Only the headers change. Values, types and the order of rows and columns stay the same.

Related Tools