Case Converter

Change the letter case of any text, or turn phrases into identifiers for code: camelCase, PascalCase, snake_case, kebab-case and CONSTANT_CASE.

Runs entirely in your browser. Nothing you enter is uploaded or stored.

How to use the case converter

Paste your text, then click the case you want. The result appears in the lower box, and your original stays untouched in the upper box so you can try several styles in a row. For the code-style cases (camelCase, PascalCase, snake_case, kebab-case and CONSTANT_CASE), each line is converted separately, so you can convert a whole list of field names at once.

What each case does

CaseInput: user profile settingsTypical use
UPPERCASEUSER PROFILE SETTINGSLabels, acronyms, emphasis
lowercaseuser profile settingsNormalising input, tags
Title CaseUser Profile SettingsHeadlines, book and article titles
Sentence caseUser profile settingsUI text, body copy, many style guides' headings
camelCaseuserProfileSettingsJavaScript and Java variables, JSON keys
PascalCaseUserProfileSettingsClass names, React components, C# types
snake_caseuser_profile_settingsPython, Ruby, database columns
kebab-caseuser-profile-settingsURLs, CSS classes, file names
CONSTANT_CASEUSER_PROFILE_SETTINGSConstants and environment variables

Converting between code styles

The code-style converters first split the input into words. They split on spaces, hyphens, underscores, dots and other punctuation, and also at the boundary between a lowercase and an uppercase letter. That means you can feed in any style and get any other style out:

  • getHTTPResponse to snake_case gives get_http_response.
  • first_name to camelCase gives firstName.
  • Order-ID total to kebab-case gives order-id-total.

Title case rules

Title case here capitalises the first letter of every word except short articles, conjunctions and prepositions such as a, an, the, and, of, in, on, to and for, which stay lowercase unless they start the title or follow a colon. So the lord of the rings becomes The Lord of the Rings. Style guides such as AP, Chicago and APA disagree on details, for example whether to capitalise prepositions with four or more letters, so review titles that will be published.

Common problems

  • Names and acronyms lose their capitals. Sentence case and title case lowercase everything first, so NASA becomes Nasa and iPhone becomes Iphone. Fix proper nouns by hand afterwards.
  • Accented letters disappear in identifiers? They do not: letters like é or ü are kept. If you need ASCII-only names for URLs, use the slug generator instead.
  • Numbers stick to words. version2 update becomes version2Update; add a space before the number if you want it separated.

Frequently asked questions

What is the difference between camelCase and PascalCase?

Both join words without spaces and capitalise each word. camelCase keeps the first letter lowercase, as in userName, while PascalCase capitalises it too, as in UserName.

When should I use snake_case or kebab-case?

snake_case is common for Python variables and database columns. kebab-case is used in URLs, CSS class names and file names, because hyphens are readable and safe in those places.

Does the converter keep accented and non-English letters?

Yes. Uppercase, lowercase and the code-style cases all handle accented letters and other alphabets. Only spaces and punctuation are used as word separators.

Why did my acronym change from NASA to Nasa?

Title case and sentence case lowercase each word before capitalising its first letter, so acronyms and brand names lose their capitals. Correct those words manually after converting.

Is the text I convert saved anywhere?

No. The conversion runs in your browser. Your text is not uploaded or stored.