Case converter

Paste your text, pick a case and the converted text appears instantly. It converts to UPPER CASE, lower case, Title Case, Sentence case, camelCase, PascalCase, snake_case, kebab-case, CONSTANT_CASE and aLtErNaTiNg case, and can remove extra spaces. Copy the result or download it as a .txt file.

Free, no sign-up Runs in your browser

Convert to

What each case looks like

Here is the same line, "how to write a JSON API in five steps", in every case the tool offers:

CaseResultTypical use
UPPER CASEHOW TO WRITE A JSON API IN FIVE STEPSShort labels, signs, acronyms. Long passages in capitals are hard to read.
lower casehow to write a json api in five stepsTags, email addresses, cleaning up data before comparing it.
Title CaseHow to Write a JSON API in Five StepsHeadlines, book, film and article titles.
Sentence caseHow to write a JSON API in five stepsBody text, buttons and menus, and many news and blog headlines.
camelCasehowToWriteAJsonApiInFiveStepsVariables and functions in JavaScript and Java.
PascalCaseHowToWriteAJsonApiInFiveStepsClass names, React components, C# methods.
snake_casehow_to_write_a_json_api_in_five_stepsPython and Ruby names, database columns.
kebab-casehow-to-write-a-json-api-in-five-stepsURLs, CSS class names, file names.
CONSTANT_CASEHOW_TO_WRITE_A_JSON_API_IN_FIVE_STEPSConstants and environment variables.
aLtErNaTiNghOw To WrItE a JsOn ApI iN fIvE sTePsJokes and memes. Not for anything serious.

Remove extra spaces collapses runs of spaces and tabs into one space, trims each line and removes extra blank lines. It is useful after copying text from a PDF.

Title case rules used here

There is no single standard for title case. Style guides agree on the basics, and this tool follows them:

  • Capitalise the first and the last word, and the first word after a colon or a full stop.
  • Keep articles (a, an, the), short conjunctions (and, but, or, nor, for, so, yet) and short prepositions (as, at, by, in, of, on, per, to, via) in lower case.
  • Capitalise every other word, including short verbs and pronouns such as "Is", "Be" and "It".
  • Capitalise each part of a hyphenated word, except small words in the middle: "Step-by-Step".
  • Leave words that already have capitals inside them alone, so "iPhone", "NASA" and "McDonald's" survive. If the whole text is in capitals, it is lowered first.

The Chicago Manual of Style also lowercases longer prepositions such as "with", "from" and "about". If your publication follows Chicago, change those by hand.

Converting between code styles

For camelCase, PascalCase, snake_case, kebab-case and CONSTANT_CASE, the tool first splits the text into words at spaces, punctuation and existing capital letters. That means you can convert from one code style to another: userAccountID becomes user_account_id, and user_first_name becomes UserFirstName. Each line is converted separately, so you can paste a whole list of column names or keys at once.

LanguageVariables and functionsClasses and typesConstants
Python (PEP 8)snake_casePascalCaseCONSTANT_CASE
JavaScript, TypeScriptcamelCasePascalCaseCONSTANT_CASE
JavacamelCasePascalCaseCONSTANT_CASE
C#camelCase for locals, PascalCase for methodsPascalCasePascalCase
Ruby, Elixirsnake_casePascalCaseCONSTANT_CASE (Ruby)
GocamelCase, or PascalCase to exportPascalCase or camelCaseSame as variables
CSS, URLskebab-case

Tips

  • Chain conversions. Click Use as input to feed the result back in, for example to remove extra spaces and then apply Title Case.
  • Check proper nouns. Sentence case can't know that "paris" or "monday" need a capital. Read the result before you publish it.
  • Other languages work. Accented letters convert correctly (é → É). Letters follow standard Unicode rules, so Turkish dotted and dotless i are not handled the Turkish way.
  • Count as you go. To check a headline's length, paste it into the word counter. To tidy JSON keys, use the JSON formatter.

Frequently asked questions

What is title case?
Title case capitalises the main words of a title, such as nouns, verbs and adjectives, and keeps short words like "a", "the", "and" and "of" in lower case unless they come first or last. Example: "The Lord of the Rings".
What is the difference between title case and sentence case?
Title case capitalises most words: "How to Write a Great Headline". Sentence case capitalises only the first word and proper nouns, like a normal sentence: "How to write a great headline".
What is the difference between camelCase and PascalCase?
Both join words without spaces and capitalise each new word. camelCase starts with a small letter (firstName); PascalCase starts with a capital (FirstName).
Should URLs use hyphens or underscores?
Use hyphens (kebab-case). Google's URL guidelines recommend hyphens rather than underscores to separate words, and hyphens are easier to read when a link is underlined.
Is my text sent anywhere?
No. The conversion runs in your browser. Only your chosen case is remembered on this device; the text itself is not stored or uploaded.

Last updated . How we check our tools.