Case Converter: Uppercase, Lowercase, camelCase & snake_case

Ten case styles, one click each. The prose styles (UPPERCASE, lowercase, Title Case, Sentence case) keep your spacing and punctuation. The code styles (camelCase, PascalCase, snake_case, kebab-case, CONSTANT_CASE) split the text into words first and then join them again.

Choose a Case Style

Runs in your browser: your files and text are not uploaded. Free, no account needed.

Last updated: · Reviewed by the QuickTooly Team

Case Converter Guide

What each case style does to your text

StyleExampleRule
UPPERCASEorder id 42 → ORDER ID 42Every letter capitalised.
lowercaseOrder ID 42 → order id 42Every letter lowercased.
Title Casethe QUICK brown fox → The Quick Brown FoxFirst character of each space-separated word capitalised, the rest lowercased. No small-word exceptions.
Sentence caseHELLO THERE. how are you? → Hello there. How are you?All lowercased, then the first letter and each letter after . ! or ? plus a space capitalised.
camelCaseuser first name → userFirstNameWords joined, first word lowercase, later words capitalised.
PascalCaseuser first name → UserFirstNameWords joined, every word capitalised.
snake_caseuserFirstName → user_first_nameWords joined with _ and lowercased.
kebab-caseBackground Color → background-colorWords joined with - and lowercased.
CONSTANT_CASEapi base-url → API_BASE_URLWords joined with _ and uppercased.
aLtErNaTiNghello world → hElLo wOrLdCharacters alternate lower/upper by position. Spaces count as positions.

How words are split for camelCase, snake_case and kebab-case

Before joining, the converter breaks the input into words. It splits on spaces, tabs and line breaks, on any punctuation or symbol (including _ and -), and on case changes: between a lowercase letter or digit and a following uppercase letter, and before the last capital of an acronym that runs into a word. Case changes are detected for ASCII A–Z only.

  • Acronyms: a run of capitals is kept as one word, and the last capital starts the next word when lowercase letters follow it, so XMLHttpRequest becomes xml_http_request.
  • Numbers: digits stay attached to the letters before them, and a capital after a digit starts a new word. version2Update becomes version2_update in snake_case.
  • Punctuation: commas, dots, apostrophes and other symbols are dropped and act as word breaks. hello, world! becomes hello_world, and don't becomes don_t. Accented letters are kept; use the slug generator if you need them transliterated.
  • Several lines: the code styles treat line breaks as spaces, so a list of names becomes one long identifier. Convert one identifier at a time.

Converting between code styles

Because existing capitals mark word breaks, any code style converts straight into any other. user_first_name, user first name and UserFirstName all become userFirstName, and myVariableName becomes MyVariableName in PascalCase. Each word is lowercased after splitting, so an acronym such as XML comes out as Xml in camelCase and PascalCase.

Limits of Sentence case

Sentence case lowercases everything, including the pronoun I, names and acronyms such as NASA. A new sentence is detected only after ., ! or ? followed by whitespace, and only when the next character is an ASCII letter, digit or underscore. A sentence that starts with a quotation mark or an accented letter such as é stays lowercase. Fix those words by hand after converting.

Case converter questions

Can I convert existing camelCase to snake_case or PascalCase?

Yes. A lowercase letter or digit followed by a capital marks a word break, so myVariableName becomes my_variable_name in snake_case and MyVariableName in PascalCase. Acronyms are kept together: XMLHttpRequest becomes xml_http_request.

Does Title Case here follow AP or Chicago rules?

No. It capitalises the first letter of every word, including a, of and the, and lowercases the rest of each word. For style-guide rules that keep short words lowercase, use the Title Case Converter.

What happens to line breaks?

UPPERCASE, lowercase, Title Case, Sentence case and alternating case keep your line breaks. The five code styles treat line breaks as spaces and return a single identifier.

Related text tools

  • Title Case Converter: AP, APA, Chicago and MLA headline rules, which plain Title Case here does not apply.
  • URL Slug Generator: removes punctuation and transliterates accents, which kebab-case keeps.
  • Find and Replace: strip symbols or insert spaces before converting identifiers.