CSV Header Normaliser

Rewrite CSV headers to snake_case, camelCase, PascalCase or kebab-case.

Open tool

Overview

The CSV header normaliser rewrites the first row of a CSV into a consistent naming convention — snake_case, camelCase, PascalCase, or kebab-case. The rest of the data is untouched, so a noisy export with headers like First Name, LASTNAME, and email-address ends up with predictable column names ready for import.

Data engineers and analysts use a csv header cleaner before loading files into a database, a JSON API, or a typed language model that requires identifier-safe names. It's a tiny step that prevents downstream parsing errors and ugly quoted column names in SQL.

How it works

Each header cell is tokenised: runs of letters and digits become tokens, and the splits happen on whitespace, punctuation, and transitions between lowercase and uppercase (so firstName splits into first/Name). The tokens are then joined according to the chosen convention.

  • snake_case lowercases each token and joins with _
  • camelCase lowercases the first token and capitalises the rest
  • PascalCase capitalises every token
  • kebab-case lowercases each token and joins with -

Leading digits are prefixed with an underscore where the target convention requires identifier-safe output (snake_case, camelCase, PascalCase).

Examples

Headers in:  First Name, LASTNAME, email-address
snake_case:  first_name,last_name,email_address
camelCase:   firstName,lastName,emailAddress
PascalCase:  FirstName,LastName,EmailAddress
kebab-case:  first-name,last-name,email-address
Headers in:  Order #, Total ($USD), 2024_Q1
snake_case:  order,total_usd,_2024_q1

FAQ

Are duplicate headers handled?

If normalisation produces a collision (First Name and first name both become first_name), the tool appends _2, _3, etc. to keep names unique while staying close to the original.

Does it strip non-ASCII characters?

By default accented letters are folded to their ASCII equivalents (ée) so the output is safe for systems with strict identifier rules. Disable the option if you want to keep Unicode characters in the headers.

What about reserved words?

The normaliser doesn't escape SQL or language keywords — select will pass through as-is. Suffix or rename manually if your target system reserves the word.

Try CSV Header Normaliser

An unhandled error has occurred. Reload ×