CSV Header Row
Fix the first line of a CSV. Add column names to a headerless export, drop a header a database importer doesn't want, rename columns in bulk, or promote the real header when the file starts with junk rows from a report generator. Duplicate and blank names are resolved automatically, and you get a before/after mapping table.
How to edit a CSV header row
- Paste the CSV or drop a file.
- Pick an action: add for a file whose first line is already data, remove to strip names off, rename to replace them, promote row N when the header sits below a title or blank rows.
- For add and rename, type the new names comma-separated. Leave a position blank to keep the existing name, or leave the whole field blank to get
column_1 … column_n. - Optionally normalise the names to
snake_case,camelCase, or Title Case, then copy or download.
What it cleans up automatically
- Blank names become
column_3-style placeholders, so no column ends up unaddressable. - Duplicates get a numeric suffix — two
emailcolumns becomeemailandemail_2. Pandas, SQL loaders, and most ORMs choke on repeated names. - Stray whitespace around names is trimmed;
snake_casealso strips quotes, punctuation, and accents-unfriendly characters that breakSELECTstatements.
Why "promote row N" exists
Exports from BI tools and accounting systems often start with a report title, a date, and a blank line before the real column names. Every parser then treats that title as the header and everything after it as one-column garbage. Setting N to the line that actually holds the names discards everything above it and keeps the rest as data.
FAQ
How do I add a header to a CSV without one?
Choose add a header row and type the names. The tool matches the file's column count, filling any names you don't supply with column_n.
Can I reorder or delete columns here too?
That's Keep / rename / reorder, which gives you a per-column list with checkboxes and move buttons.
Does renaming break the data rows?
No. Only the first line changes; data rows are re-emitted unchanged apart from standard CSV re-quoting.
My header has a weird invisible character at the start.
That's a byte-order mark. Encoding & BOM removes it, and Repair CSV does too as part of its pass.
Privacy
100% client-side. No upload. See the privacy policy.