camelCase ↔ snake_case Converter
Paste one identifier or a whole column of them. Every format is generated at once — copy whichever you need.
Paste one identifier or a whole column of them. Every format is generated at once — copy whichever you need.
Paste one identifier or a whole column of them and convert between camelCase, PascalCase, snake_case, kebab-case and SCREAMING_SNAKE_CASE. Multi-line input is processed line by line, which makes this quick work for renaming a batch of database columns or a block of JSON keys.
The hard part of case conversion is not the delimiter — it is deciding where one word ends and the next begins. parseHTTPResponse contains a three-letter acronym in caps, and a naive splitter will produce parse_h_t_t_p_response. This tool detects consecutive capitals as a unit and returns parse_http_response, with a toggle if you want the other behaviour.
Which convention you need is usually decided by the language rather than by preference. Python's PEP 8 asks for snake_case functions and variables. JavaScript and Java conventionally use camelCase for both, with PascalCase for classes and components. CSS custom properties and URL slugs use kebab-case. Go signals exported identifiers with a leading capital, which makes PascalCase load-bearing rather than cosmetic.
Both join words without separators and capitalise each word after the first. camelCase leaves the first letter lowercase, as in userName. PascalCase capitalises it, as in UserName. PascalCase is also called upper camel case, which is why the two terms get confused.
Consecutive capital letters are treated as a single word by default, so parseHTTPResponse becomes parse_http_response rather than splitting on every letter. Converting the other way, the tool cannot know that http was originally an acronym, so it returns parseHttpResponse — which happens to be what Google's Java and Go style guides recommend anyway.
Python's PEP 8 specifies snake_case for functions and variables and PascalCase for classes. JavaScript conventionally uses camelCase for variables and functions, PascalCase for classes and React components. CSS uses kebab-case. Go uses PascalCase for exported identifiers and camelCase for unexported ones, where the capital letter is a language rule rather than a style preference.
Yes. Each line is converted separately, so you can paste a list of column names or object keys and get the whole set back in one operation.
Digits are kept in place and are not treated as word boundaries by default, so user2Name becomes user2_name rather than user_2_name. Style guides disagree on this point, so check the output if your identifiers are digit-heavy.
Yes, they are two names for the same convention: all capitals with underscores between words. It is conventionally reserved for constants and environment variables across most languages.
Lowercase words joined by hyphens. It is standard for CSS class names and custom properties, URL slugs, and npm package names. It cannot be used for identifiers in most programming languages because the hyphen parses as a minus sign.
No. Everything runs in your browser. Nothing is uploaded, which matters if the identifiers you are converting come from a private codebase.