Skip to main content

Change text case

Switch text between several case styles to standardise its presentation, or turn a phrase into a camelCase, snake_case or kebab-case identifier for code.

  • Clipboard
Automate

Embed this widget

Customize the result, check the live preview, then copy the code.

Preview

Embed code type

Code to copy

Responsive and automatically resized by Bethemesh.

Transformation

Was this tool useful?

How does this tool work?

Change the case of a text or generate identifiers in several common conventions. Check the result whenever accents, punctuation or proper names matter.

Nine modes are available: UPPERCASE, lowercase, Title Case, Sentence case, camelCase, PascalCase, snake_case, kebab-case and CONSTANT_CASE. The modes meant for code remove accents and punctuation, and characters from non-Latin scripts may disappear. Upper and lower case follow the Unicode rules available in the browser. Title Case capitalises every word, including short words such as “and” or “of”, so it does not follow every editorial style guide. An automatic conversion does not always recognise acronyms or proper names. The right case depends on the context. Capitals can harmonise a label, but a whole paragraph in capitals is usually harder to read. Sentence case suits ordinary text; Title Case should be reviewed against the typographic conventions of the language. For programming identifiers, camelCase and PascalCase join words without a separator, while snake_case and kebab-case use an underscore and a hyphen respectively. CONSTANT_CASE gives upper-case words separated by underscores. These conventions are not interchangeable in every language and system: an identifier used in code must follow the rules of its environment. Because the code modes remove accents and punctuation, two different expressions can become identical after conversion, and characters from other writing systems can be lost. So do not convert names of people, brands, official references or multilingual content without checking. For batch work, first test a few examples containing apostrophes, hyphens, digits and accented characters. Finally, make sure the result keeps the meaning and readability you want: the tool changes the form of the text, not the quality of the writing. If the result is to become a variable name, also check that it does not start with a character the language forbids and does not clash with a reserved word. Case conversion prepares the shape of an identifier but does not validate its syntax in a software project.

How to use this tool

  1. Enter the text

    Paste the passage or phrase to transform.

  2. Choose a mode

    Select one of the nine conventions available.

  3. Check the conversion

    Review accents, acronyms and non-Latin characters.

Use cases

Harmonising headings

Convert titles to capitals, lowercase or Title Case, then check the typography.

Creating identifiers

Turn phrases into camelCase, snake_case or kebab-case for use in code.

Preparing constants

Generate a CONSTANT_CASE name from separate words.

Examples

Converting to capitals

Input

Hello world

Result

HELLO WORLD

Sentence case

The text is lowercased, then the first letter of each sentence is capitalised again. Proper names must be corrected by hand.

Input

HELLO. HOW ARE YOU?

Result

Hello. How are you?

Identifier names

The words are split, lowercased and then joined according to the chosen convention.

Input

Unit price excl VAT

Result

camelCase: unitPriceExclVat
snake_case: unit_price_excl_vat
kebab-case: unit-price-excl-vat

Tips and best practices

  • Identifier modes may remove non-Latin characters.
  • Title Case needs an editorial review, especially for proper names and short words.
  • In identifier modes, accents are removed: “Café” becomes “cafe”.

Sources and references

Frequently asked questions

Are accents kept?

UPPERCASE, lowercase, Title Case and Sentence case keep them; the identifier modes remove them.

Is punctuation kept?

Yes in the text modes, no in the identifier modes.

Does Title Case follow every typographic rule?

No. It capitalises every word, including articles and prepositions, so review the titles you get.

Is camelCase available?

Yes, along with PascalCase, snake_case, kebab-case and CONSTANT_CASE.

Can non-Latin characters disappear?

Yes, in the modes intended for code. The text modes keep them.

Related tools

Tools similar or complementary to this one.

Similar tools

Remove extra spaces, repeated tabs and empty lines from copied text.

Text & writingFeaturedUse this tool

Automatically remove empty lines and lines containing only spaces from a text.

Text & writingUse this tool

Replace a text fragment in a pasted or imported document.

Text & writingNewUse this tool