Skip to content
WebUtilityHub

Case Converter

Change text to upper, lower, title or sentence case, or turn phrases into camelCase, PascalCase, snake_case and kebab-case identifiers. The result updates as you type.

Convert to

camelCase, PascalCase, snake_case and kebab-case convert each line separately, so you can convert a list of names at once.

How to use the Case Converter

  1. Choose the case you want at the top of the tool, for example “Title Case” or “snake_case”.
  2. Type or paste your text in “Your text”. The converted version appears straight away.
  3. Switch between cases as often as you like; your original text is never changed.
  4. Click “Copy result” to copy the converted text.

Examples

Title Case for a headline
Input
the lord of the rings: the return of the king
Result
The Lord of the Rings: The Return of the King
Short words such as “of” and “the” stay lowercase, except as the first or last word or after a colon.
Sentence case for text typed with Caps Lock
Input
THIS IS A TEST. IT WORKS! i think so.
Result
This is a test. It works! I think so.
Variable names from a list (camelCase)
Input
first name
last name
HTTP response code
Result
firstName
lastName
httpResponseCode
Each line is converted separately, so a whole list of names can be converted at once.
kebab-case for a URL slug
Input
10 Tips for Better Sleep!
Result
10-tips-for-better-sleep

Choosing the right case

UPPERCASE is useful for short labels and acronyms, but long passages in capitals are harder to read. lowercase is handy for normalising email addresses, tags or keywords before comparing them.

Title Case suits headlines, book and film titles, and email subject lines. Sentence case reads more naturally for body text, buttons and most interface labels, and is the style many modern websites use for headings.

Cases for code and URLs

Programming languages and tools have their own conventions. JavaScript and Java use camelCase for variables and functions and PascalCase for classes and components. Python, Ruby and database columns typically use snake_case. URLs, CSS class names and many file names use kebab-case, which search engines also read as separate words.

Code cases are applied line by line and drop punctuation, so 10 Tips for Better Sleep! becomes 10-tips-for-better-sleep, a clean slug ready to use in a URL.

If pasted text has extra spaces or blank lines, tidy it with the Text Cleaner before converting. To check the length of a headline or title afterwards, paste it into the Word Counter.

Common uses

  • Fixing text that was typed with Caps Lock on.
  • Formatting headlines, article titles and email subject lines in Title Case.
  • Turning labels or column names into variable, function or class names for code.
  • Creating URL slugs, CSS class names and file names in kebab-case or snake_case.
  • Making lists of names or headings consistent before pasting them into a document.

Limitations

  • Sentence case cannot recognise proper nouns, so names such as “Paris” or “NASA” become lowercase and need fixing by hand.
  • Title Case follows one common style (short articles, conjunctions and prepositions in lowercase). Style guides such as APA, Chicago or AP differ in details, for example on prepositions of four or more letters.
  • Code cases keep accented letters (“café_crème”). Remove accents yourself if your programming language or system only accepts ASCII identifiers.
  • Some letters change length when their case changes, for example the German “ß” becomes “SS” in uppercase.

Frequently asked questions

What is the difference between Title Case and Sentence case?

Title Case capitalises the main words of a phrase (“The Return of the King”) and is used for headlines and titles. Sentence case capitalises only the first word of each sentence, plus the pronoun “I” (“The return of the king”), and is used for normal text and many modern interface labels.

Which words stay lowercase in Title Case?

Articles (a, an, the), short conjunctions (and, but, or, nor, for, so, yet) and short prepositions (as, at, by, in, of, off, on, per, to, up, via) stay lowercase in the middle of a title. They are capitalised when they are the first or last word, or come right after a colon or a dash.

Does Title Case keep acronyms like NASA or brand names like iPhone?

Yes. Words written entirely in capitals (NASA, PDF) and words with capitals inside them (iPhone, JavaScript) are kept as you typed them. The exception is text written entirely in capitals, which is treated as Caps Lock text and converted normally.

What are camelCase, PascalCase, snake_case and kebab-case?

They are ways of writing several words without spaces, used for names in code. camelCase starts lowercase and capitalises the following words (userName). PascalCase capitalises every word (UserName). snake_case joins lowercase words with underscores (user_name), and kebab-case joins them with hyphens (user-name).

How are words split for camelCase and the other code cases?

Spaces, punctuation, underscores and hyphens separate words, and so do existing capital letters, so “getUserID” and “get_user_id” both become “get user id” before conversion. Apostrophes inside words are removed, so “don't” becomes “dont”.

Count words, characters, sentences, paragraphs and lines, with an estimated reading time.

Text

Remove extra spaces and empty lines, normalise line breaks and tidy pasted text.

Text

Remove repeated lines from a list while keeping the original order, with case and whitespace options.

Text