By Docify

How to Change Case in Text in the Browser

• 6 min read

To change case in Docify, paste once. Eight cards update in the browser: toUpperCase and toLowerCase, sentence case after .?! only, Title Case via \b\w, and snake, kebab, camel, and Pascal forms that split only on whitespace. A bare LF is not a sentence boundary: hello plus LF plus world becomes Hello plus LF plus world. A period plus LF does capitalize the next word. Copy one card. Nothing is uploaded.

This is not Word's Shift+F3 cycle, a Docs menu, or Excel =PROPER(). The live case converter exposes eight named JavaScript mappings at once.

Writing cases

UPPERCASE and lowercase

String.prototype.toUpperCase and toLowerCase (JavaScript's default Unicode case mapping). Spaces and punctuation stay in place. See the UPPERCASE walkthrough.

hello world → HELLO WORLD

Sentence case

Lowercase first, then uppercase the first word character at the start (after optional leading whitespace) and after . ? ! plus optional whitespace (/(^\s*\w|[.!?]\s*\w)/g). A bare LF is not a terminator, so hello\nworld becomes Hello\nworld. hello.\nworld becomes Hello.\nWorld. Colons and commas do not start a new sentence, so hello,\nworld stays Hello,\nworld.

HELLO. HOW ARE YOU? → Hello. How are you?
hello\nworld → Hello\nworld

Title Case

Lowercase first, then uppercase each \b\w character. This is not Chicago or AP title case: small words are capitalized. An apostrophe is a word boundary, so don't becomes Don'T.

the end of the day → The End Of The Day

Identifier cases

These four lowercase the string, then treat whitespace as the only separator. Existing camelCase humps, hyphens, and underscores are not split. Conventions such as PEP 8 or “kebab-case for URLs” are style guides, not extra tool modes.

Inputsnake_casecamelCase
user profile datauser_profile_datauserProfileData
getUserDatagetuserdatagetuserdata
user-profileuser-profileuser-Profile

kebab-case is snake_case with - instead of _. PascalCase uses the same whitespace drop as camelCase but uppercases every word-start character. A hyphen is a word boundary for camel/Pascal/Title, so user-profile becomes user-Profile on camelCase — the hyphen stays. Details for the underscore card are in the snake_case guide.

What this page does not do

A camelCase splitter

getUserData is lowercased to getuserdata before any of the identifier cards run. You will not get get_user_data from that input.

SCREAMING_SNAKE_CASE

There is no constants card. UPPERCASE keeps spaces (HELLO WORLD). snake_case is lowercase-plus-underscores. Combine them yourself if you need HELLO_WORLD.

Change case in the browser

Eight live mappings. Whitespace-only identifier splits. Nothing is uploaded.

Use Case Converter →

FAQ

Does this page upload the text I convert?
No. The companion case converter runs every preview and Copy in your browser. Nothing is sent to a server.
How do the eight cards update?
They recompute on every keystroke. There is no Convert button, no file picker, and no download. Copy on a card writes that card’s string to the clipboard and stays disabled while the input is empty.
What is the difference between Sentence case and Title Case here?
Both start with toLowerCase(). Sentence case then uses /(^\s*\w|[.!?]\s*\w)/g: the first word character at the start (after optional leading whitespace) and after . ? ! plus optional whitespace. A bare LF is not a terminator, so hello plus LF plus world becomes Hello plus LF plus world. hello. plus LF plus world becomes Hello. plus LF plus World because \s includes the newline. Colons and commas also do not start a sentence. Title Case uppercases every \b\w character, including articles and the letter after an apostrophe ("don't" → "Don'T").
Why does camelCase look like PascalCase if I pad the input?
camelCase keeps the first character lowercase only when that match sits at index 0. Leading whitespace is dropped first, so a padded phrase is capitalized like PascalCase. Neither form splits on hyphens or existing camelCase.

Related