Case converter

UPPERCASE, lowercase and Title Case — plus camelCase, snake_case and kebab-case naming. Handy whenever you write code or name variables.

Input text
Result
—

The text cases, and where each one belongs

CaseExampleTypical use
UPPER CASEUSER_IDConstants, acronyms, env variable names
lower caseuser_idDatabase columns, Unix file names
Title CaseUser IdHeadings, article titles
Sentence caseUser idSentences, UI labels
camelCaseuserIdJava, JavaScript, Swift properties
PascalCaseUserIdClass and type names, React components
snake_caseuser_idPython, Ruby, SQL
kebab-caseuser-idURLs, CSS class names, HTML attributes

Consistency matters more than which convention you pick. A codebase that mixes user_id and userId is harder to search than one that commits to either.

Why "Title Case" is harder than it looks

Proper title casing is not "capitalise every word". Most style guides — Chicago, APA, and the major newspapers — keep short articles, conjunctions and prepositions lowercase unless they start or end the title:

Because guides disagree about longer prepositions ("through", "between"), a converter can only apply one rule set. Expect to hand-tune titles that matter.

The traps in automatic conversion

Acronyms are where converters break

Conversion is mechanical until the input contains a run of capitals. getHTTPResponse should become get_http_response, but naive converters emit get_h_t_t_p_response, and userID becomes user_i_d instead of user_id. The rule that produces the right answer: treat a run of capitals as a single word, and split before the final capital when a lowercase letter follows it.

InputCorrectNaive result
getHTTPResponseget_http_responseget_h_t_t_p_response
userIDuser_iduser_i_d
parseURLParamsparse_url_paramsparse_u_r_l_params
OAuth2Tokenoauth2_tokeno_auth2_token

Languages also disagree about how an acronym should appear in the first place, so a name that is idiomatic in one stack looks wrong in another:

ContextConventionExample
GoAcronyms stay fully uppercaseHTTPServer, userID
Java, .NETOnly the first letter capitalisedHttpServer, UserId
Python, Ruby, SQLLowercased inside snake_casehttp_server, user_id

Related tools

Word & character counter Line tools Text diff

FAQ

What are camelCase, snake_case and kebab-case?
They are naming styles for multi-word identifiers: camelCase capitalizes the first letter of each word and joins them with no spaces; snake_case is all lowercase joined by underscores; kebab-case is all lowercase joined by hyphens. They are commonly used for variable names, file names, CSS classes and more.
Are non-letter characters affected?
Casing only applies to English letters — Chinese characters, digits and punctuation stay as they are. camelCase / snake_case / kebab-case split words at any non-alphanumeric character.
Is my text uploaded during conversion?
No. All conversions run locally in your browser and your text is never sent to a server.