Case converter
Convert a block of text into common programming and writing cases.
Docify's case converter maps one input to eight previews 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. Nothing is uploaded.
Input
UPPERCASE
Result will appear here...
lowercase
Result will appear here...
Sentence case
Result will appear here...
Title Case
Result will appear here...
snake_case
Result will appear here...
kebab-case
Result will appear here...
camelCase
Result will appear here...
PascalCase
Result will appear here...
How it works
- Type or paste text. Eight cards update in the browser. Copy writes that card's string to the clipboard. Nothing is sent to a server.
- UPPERCASE and lowercase call
String.prototype.toUpperCaseandtoLowerCase(JavaScript's default Unicode case mapping). - Sentence case lowercases the string, then uppercases 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, sohello\nworldbecomesHello\nworld.hello.\nworldbecomesHello.\nWorldbecause\sincludes the newline after the period.hello,\nworldandhello:\nworldstay lowercase on the second line. Title Case lowercases, then uppercases each\b\wcharacter. An apostrophe is a word boundary, sodon'tbecomesDon'T. - snake_case and kebab-case lowercase, then replace one or more whitespace characters with
_or-. camelCase and PascalCase drop whitespace and uppercase later word-start characters; camelCase keeps the first character lowercase only when that match is at index 0. None of these four split existing camelCase, hyphens, or underscores.
FAQ
- Does this tool upload my text?
- No. Every case preview and copy runs in your browser. The page does not send the text to a server.
- How do Title Case and Sentence case work?
- Both start with toLowerCase(). Title Case then uppercases each word-boundary character (\b\w), so a letter after an apostrophe is capitalized ("don't" becomes "Don'T"). Sentence case 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, CR, or CRLF 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 after the period. Colons and commas also do not start a sentence (hello, plus LF plus world stays Hello, plus LF plus world). This is not a paragraph-aware sentence caser.
- Does snake_case or kebab-case split camelCase?
- No. snake_case and kebab-case only replace one or more whitespace characters with _ or -. Existing camelCase humps, hyphens, underscores, and punctuation stay as-is after lowercasing. "helloWorld" becomes "helloworld", not "hello_world".
- What is the difference between camelCase and PascalCase here?
- Both lowercase the string, drop whitespace runs, and uppercase later word-start characters. 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 splits on hyphens or existing camelCase.