Lelifi·tools

Case Converter

Title Case capitalizes the major words of every phrase, so 'the quick brown fox' becomes 'The Quick Brown Fox'. Articles, conjunctions and prepositions of 4 letters or fewer stay lowercase unless they start or end the title. camelCase, snake_case and kebab-case join words with no spaces.

Paste your text, then click the case you want. This converter handles the everyday ones. UPPERCASE, lowercase, Title Case and Sentence case, plus the developer formats: camelCase, PascalCase,

By the Lelifi editors ·

Key takeaways

On this page
  1. Title Case vs Sentence case: the rule most people mix up
  2. Which words stay lowercase in Title Case
  3. camelCase, PascalCase and where each one is used
  4. snake_case, kebab-case and CONSTANT_CASE
  5. Worked example: one phrase converted eight ways
  6. How numbers, apostrophes and punctuation are handled
  7. Why URLs, CSS and file names prefer kebab-case

Title Case vs Sentence case: the rule most people mix up

These two formats get confused more than any others, and the fix is simple once you see them side by side.

The trend in software and web writing has been steadily toward sentence case, because it is easier to read and easier to keep consistent, you rarely have to decide whether a word is “important” enough to capitalize. Title Case still dominates traditional print media, many academic styles and most US newspaper headlines.

One practical warning: do not mix the two inside a single document unless you have a reason. A page with Title Case headings and Sentence case subheadings can look deliberate, but the same page with Title Case in one section and Sentence case in the next just looks careless. Pick one for each level of your document and apply it everywhere.

Which words stay lowercase in Title Case

The convention most style guides follow is to leave short function words lowercase, unless they are the first or last word of the title, or follow a colon.

The exact cutoff varies by guide. This converter leaves a word lowercase when it appears in its small-word list and is four letters or shorter; anything longer than four letters is capitalized, and the first and last words are always capitalized. Here is how that plays out:

InputTitle Case outputWhy
the war of the worldsThe War of the Worlds“of” and “the” are short function words
a tale of two citiesA Tale of Two CitiesFirst and last words capitalized
to be or not to beTo Be or Not to Be“to” is first, so it is capitalized
how to write a resumeHow to Write a Resume“to” and “a” stay down

If your house style differs, some guides capitalize every preposition, others lowercase all of them, you can always fix the handful of exceptions by hand after converting.

camelCase, PascalCase and where each one is used

The developer formats strip the spaces out entirely and signal word boundaries with capitalization or a separator. The two that use capitalization are camelCase and PascalCase.

Each language has a strong convention, and following it makes your code look native. The Google JavaScript Style Guide, PEP 8 for Python and Microsoft .NET naming guidelines all agree on the split below:

LanguageVariables & functionsTypes & classes
JavaScriptcamelCasePascalCase
JavacamelCasePascalCase
C#PascalCasePascalCase
SwiftcamelCasePascalCase
GocamelCase / PascalCase*PascalCase

*In Go the first letter also controls visibility: thing is unexported, Thing is exported to other packages.

snake_case, kebab-case and CONSTANT_CASE

The three separator-based formats all replace spaces with a punctuation character and lowercase the words. Which separator you use is dictated by the language or the file type.

The reason kebab-case wins for URLs and CSS is practical, not aesthetic. Hyphens are already valid in a URL and in a CSS selector, while underscores are awkward to type on a phone keyboard and can be hidden by the underline of a hyperlink. When a URL is underlined, user_profile can be misread as user profile or userprofile, but user-profile stays readable. That is why Google's own URL guidance and most style guides recommend hyphens over underscores in web addresses.

Worked example: one phrase converted eight ways

Take a messy, realistic input and watch what each format does to it. The phrase is:

User Login Form 2.0 (Draft)

This converter first splits on anything that is not a letter or a digit, so the period, the space, the parentheses and the version number all become boundaries. Then it applies the chosen rule:

FormatResult
UPPERCASEUSER LOGIN FORM 2.0 (DRAFT)
lowercaseuser login form 2.0 (draft)
Title CaseUser Login Form 2.0 (Draft)
Sentence caseUser login form 2.0 (draft)
camelCaseuserLoginForm20Draft
PascalCaseUserLoginForm20Draft
snake_caseuser_login_form_20_draft
kebab-caseuser-login-form-20-draft
CONSTANT_CASEUSER_LOGIN_FORM_20_DRAFT

Notice that the plain formats (UPPERCASE, lowercase, Title Case, Sentence case) keep the punctuation exactly as you typed it, while the developer formats drop it, because a variable name cannot contain a space, a period or a bracket.

How numbers, apostrophes and punctuation are handled

The two families of formats treat punctuation differently, and that trips people up.

Plain formats keep everything. UPPERCASE, lowercase, Title Case and Sentence case change only the case of letters. Every comma, apostrophe, period and bracket stays exactly where you put it. “Don't stop.” becomes “DON'T STOP.” in UPPERCASE and “Don't stop.” in Sentence case, apostrophes and periods untouched.

Developer formats remove punctuation. camelCase, PascalCase, snake_case, kebab-case and CONSTANT_CASE split the text on any character that is not a letter or a digit, then rejoin the pieces. That means periods, commas, apostrophes, brackets and slashes are all treated as word boundaries and disappear from the output. “Don't stop.” becomes dontStop, not don'tStop, because an apostrophe is not a valid character in an identifier.

Numbers survive either way. They are letters-and-digits as far as the splitter is concerned, so “Form 2” keeps its 2 in every format, it just loses the space around it in the developer styles.

Why URLs, CSS and file names prefer kebab-case

Three separate conventions converge on hyphens, and it is worth knowing why so you can apply the same logic to new situations.

snake_case is not wrong, it is just used in different places, Python packages, SQL schemas and environment variables, where the surrounding ecosystem already uses underscores. Follow the language, not your personal taste, and your names will match everything around them.

Frequently asked questions

What is the difference between Title Case and Sentence case?

Title Case capitalizes the major words of every phrase, so 'the quick brown fox' becomes 'The Quick Brown Fox'. Sentence case only capitalizes the first word and any proper nouns, giving 'The quick brown fox'. Use Title Case for headings and headlines, and Sentence case for body text and UI labels.

Which words are left lowercase in Title Case?

Short function words are normally left lowercase: articles (a, an, the), coordinating conjunctions (and, but, or, nor, for, yet, so) and short prepositions (of, in, on, at, to, by, for). The first and last words of the title are always capitalized, along with everything longer than four letters.

What is camelCase and when do I use it?

camelCase joins words with no spaces and capitalizes each word after the first, like 'myVariableName'. It is the standard naming style for variables and functions in JavaScript, Java and Swift. PascalCase is the same thing but with the first letter capitalized too, like 'MyClassName', and is used for classes and components.

What are snake_case and kebab-case?

snake_case joins lowercase words with underscores, like 'user_profile_image', and is common in Python, SQL and Ruby. kebab-case joins lowercase words with hyphens, like 'user-profile-image', and is the convention for URLs, CSS class names and HTML attributes because hyphens are URL-safe.

Does the converter change numbers or punctuation?

Numbers are kept as they are. In the developer formats (camelCase, snake_case, kebab-case) punctuation such as periods, commas and apostrophes is treated as a word separator and removed, since those formats cannot contain it. In the plain formats (UPPERCASE, lowercase, Title Case, Sentence case) all punctuation is preserved exactly as you typed it.

What is the difference between camelCase and PascalCase?

Both join words with no separator and capitalize each word, but camelCase leaves the first letter lowercase - 'myVariableName' - while PascalCase capitalizes it too - 'MyClassName'. The convention in most languages is camelCase for variables and functions and PascalCase for classes, types and components.

Should I use kebab-case or snake_case in a URL?

Use kebab-case with hyphens, like 'best-coffee-shops'. Search engines treat hyphens as word separators, so the phrase reads as four words rather than one, and hyphens are never percent-encoded in a URL. Underscores can also be hidden by the underline of a link, making 'user_profile' hard to read.

Does Title Case capitalize 'and', 'the' and 'of'?

Normally no - articles, coordinating conjunctions and short prepositions stay lowercase in Title Case, so 'the war of the worlds' becomes 'The War of the Worlds'. The cutoff this converter uses is 4 letters: a small word of 4 letters or fewer stays lowercase. The exceptions are the first and last words of the title, which are always capitalized, and any of these small words that follow a colon.

What is SCREAMING_SNAKE_CASE?

It is CONSTANT_CASE: all-uppercase words joined by underscores, like MAX_RETRY_COUNT or API_KEY. It is used for constants - values fixed at the top of a program that should never change while it runs - in languages including JavaScript, Python, Java and Go.

How does the converter handle acronyms like 'API' or 'URL'?

In the developer formats it lowercases everything first, so 'API key' becomes 'apiKey' in camelCase and 'api_key' in snake_case. In the plain formats it preserves your original letters, so 'API' stays 'API' in Title Case and Sentence case. Most style guides keep short acronyms of 2 to 4 letters uppercase in prose but lowercase them inside identifiers.

What case conventions do common languages use?

JavaScript, Java and Swift use camelCase for variables and PascalCase for classes; Python and Ruby use snake_case for variables and PascalCase for classes; Go uses PascalCase for exported names and camelCase for unexported ones; C# uses PascalCase for both. CSS and URLs use kebab-case. There are about 4 or 5 dominant conventions in total, and each language picks a consistent set.

Why does my text look wrong after pasting from Word?

Word often applies smart quotes, curly apostrophes and non-breaking spaces that look like ordinary characters but are not. The developer formats strip them automatically because they are not letters or digits, but in the plain formats they survive. If a name will not convert cleanly, retype the quote or apostrophe by hand and try again.

How many letter forms does case conversion work with?

English has 26 uppercase and 26 lowercase letters - 52 letter forms in total - plus 10 digits that case conversion leaves unchanged. That is why UPPERCASE and lowercase never change the length of your text: they only swap one form of a letter for the other.

Spotted a wrong number or a broken result?

More Text tools

See all Text tools

Fee schedules, rates and rules change without notice. Always confirm important figures with the official source before you rely on them.