Loading Code Case Converter…
One identifier per line; blank lines are kept.
Only camelCase and PascalCase can tell the difference.
Type a name to see where the words are found.
Words are found by breaking at every separator, at each lowercase-to-uppercase step, and one letter before a capital that is followed by a lowercase letter. That last rule is what reads parseHTTPResponse as parse + HTTP + Response instead of parse + HTTPResponse, and IOError as IO + Error.
Rename a field once and it has to be renamed in five notations: camelCase in the JavaScript that reads it, PascalCase for the class or component, snake_case in the Postgres column, kebab-case in the CSS class or URL segment, CONSTANT_CASE for the environment variable, and dot.case for the config key. This converter takes an identifier in any of those forms and gives you all six, or converts a pasted list one name per line.
Because every convention comes from the same word split, user_profile_image, userProfileImage and User Profile Image all produce identical output — it does not matter which form is in your clipboard.
Splitting on separators and at each lowercase-to-uppercase step is the obvious rule, and it is not enough. Under that rule alone parseHTTPResponse is two words, parse and HTTPResponse, and the snake_case answer comes out as parse_httpresponse — which is wrong in a way that is easy to miss in a diff.
The extra rule this tool applies is that a run of capitals ends one letter early when the next capital is followed by a lowercase letter. That single addition reads parseHTTPResponse as parse + HTTP + Response, IOError as IO + Error, getURLFor as get + URL + For, and XMLHttpRequest as XML + Http + Request. So the answers are parse_http_response, io_error, get_url_for and xml_http_request. The word split is shown on screen for whatever you type, with each acronym marked, so you can see the rule being applied rather than take it on trust.
Separator cases flatten everything, so the acronym question only arises in camelCase and PascalCase, where you must choose between parseHttpResponse and parseHTTPResponse. Both appear in real code. Google’s style guides and Microsoft’s .NET framework design guidelines both say to treat an acronym as an ordinary word — Http, Io, Url — while the standard browser API XMLHttpRequest does the opposite and has done since 1999.
The default here is to capitalise, and the reason is reversibility. parseHttpResponse and parse_http_response convert into each other indefinitely. parseHTTPResponse converts to parse_http_response and cannot come back, because nothing in the underscored form records which words were initialisms. Switch to preserving if you are matching existing code, and note that a leading acronym is lowercased in camelCase under either setting: URLFor becomes urlFor, since a camelCase name whose first word is capitalised is not camelCase.
Digits stay attached to the letters they follow, which is what makes base64Encoder split as base64 + Encoder and sha256Hash as sha256 + Hash rather than scattering the numbers into words of their own. Trailing digits on an acronym come with it, so parseUTF8String gives parse_utf8_string rather than parse_utf_8_string.
A leading underscore is kept for the conventions that use one — _privateName becomes _private_name and stays _privateName in camelCase — because in Python and TypeScript that underscore is a visibility marker rather than part of the name. It is dropped for kebab-case and dot.case, where a leading separator would be invalid. Letters outside ASCII are kept rather than stripped, so café_bar converts to caféBar instead of losing a character. Input with no letters or digits at all is handed back untouched, and blank lines in a pasted list are preserved so the list keeps its shape.
snake_case, in Postgres especially: unquoted identifiers are folded to lowercase, so a column created as userId is stored as userid and every query that spells it userId only works by accident. Underscored names sidestep the folding rules entirely and read the same everywhere.
Because the default rule treats an acronym as a word, and IO is an acronym of two letters. Set acronyms to be preserved and it comes back as IOError. The separator forms are io_error and IO_ERROR either way, since neither setting changes anything once the capitals are flattened.
Yes — paste one identifier per line and each is converted independently, which is the quickest way to rewrite a block of struct fields, a set of environment variable names or the column list from a schema dump. Blank lines stay where they were.
Hierarchical keys rather than variables: metric names in StatsD and Prometheus exporters, Java package and logger names, Spring and application configuration keys, and Elasticsearch field paths. The dot is read as a level separator by whatever consumes it, so the same rules that make a good slug apply here too.
Because nothing in it marks the boundary. Words are found from separators and capitalisation, so a name typed in lowercase with no underscore, such as userprofile, is one word as far as any tool can tell. Add a separator and every convention falls into line.