How to rename CSV columns
The mapping changes header labels while the parsed cell values and column order stay in place. The workspace then applies your header policies, lists missing source headers and collisions, and shows the result before you click Export CSV.
Rename CSV headers with an old-to-new mapping
Enter one old header=new header pair per line in Old-to-new header mapping, one pair per line. The parser trims text around the first = and matches each old name against the original header row. A renamed label cannot feed a later pair.
Input: first_name,last_name,dob
Alice,Smith,1990-01-02
Mapping: first_name=First Name
Output: First Name,last_name,dob
Alice,Smith,1990-01-02
- Blank lines,
#comments, lines without=, and empty old headers are ignored. - If a source header appears twice, the first matching column is renamed.
- A later pair for the same source replaces the earlier target for that column.
- A source that is absent appears under Missing source headers and is skipped.
Change CSV column names with header policies
Trim policy has the choices Leave whitespace as-is and Trim leading/trailing whitespace. Case policy has Leave case as-is, lowercase, UPPERCASE, and Title Case. Each setting runs on every output header, including headers with no mapping. Cell values stay unchanged.
Enable Match source headers case-insensitively when the capitalization in the mapping differs from the file. After the settings run, duplicate output names appear under Collisions. The renamed headers remain in the result, including colliding names.
How to rename and export CSV columns
- Paste data into Paste CSV content, or use Drop a CSV file here and click browse files to choose a
CSV, TXTfile. - Enter each source and replacement name in Old-to-new header mapping, one pair per line.
- Select Trim policy and Case policy, then enable Match source headers case-insensitively when needed.
- Review Header preview, Missing source headers, Collisions, and Preview of result.
- Click Export CSV to download all parsed data rows.
CSV parsing, preview, and reset limits
The parser uses commas and has no delimiter selector. It reads quoted fields, doubled quotes, and CR/LF line endings. Blank input leaves the result workspace hidden. Column order stays fixed.
Preview of result shows up to 100 data rows and reports shown and total counts. Export CSV serializes all parsed rows with line-feed endings, quotes fields when needed, and adds a final newline. The exported text does not preserve the original file bytes.
Reset mapping clears the mapping and rebuilds the result for the current CSV. Clear input removes the CSV text, mapping, and result workspace.
Where renaming CSV columns comes up
- A spreadsheet export uses
first_name,last_name, anddob; you map those headers to the labels required by the next import while leaving each row intact. - A data handoff contains a typo in the mapping. The Missing source headers report shows the unmatched name before you export.
- A reporting file has inconsistent capitalization or spaces in its headers. You set Trim policy or Case policy across the output, then inspect the header preview.
Choose the right dataset transform
Use Rename Columns when only header labels need to change. Use Dataset Transform Tools for other dataset reshaping jobs. Choose Pivot Table Generator for row fields, column fields, value fields, and an aggregation. Choose Transpose Table to swap rows and columns. Choose Unpivot Table to turn wide columns into long-format attribute/value records.
FileReader reads selected file text in the browser. The page script parses, maps, previews, and exports that text, with no request that uploads the CSV content.
Frequently asked questions
How do I rename CSV columns without changing the data?
Paste or choose the CSV, enter an old-to-new header mapping, and check Preview of result before clicking Export CSV. Rename Columns changes the header row, keeps cell values unchanged, and preserves column order.
How do I rename CSV headers with different capitalization?
Enable Match source headers case-insensitively to match mapping names without regard to capitalization. Use Case policy to set capitalization for every output header.
What happens when a CSV column name is missing or duplicated?
A missing mapped name appears under Missing source headers and is skipped. A duplicate final name appears under Collisions, and the mapped headers remain in the result.
Can I preview renamed CSV columns before exporting?
Header preview shows the resulting header row. Preview of result shows up to 100 data rows with shown and total counts, while Export CSV includes all parsed data rows.