DEV Community

Cover image for UPPERCASE, camelCase, kebab-case — Every Text Case Explained With One Example
Tasleem Akhtar (#Ch)
Tasleem Akhtar (#Ch)

Posted on

UPPERCASE, camelCase, kebab-case — Every Text Case Explained With One Example

Every developer, marketer, and student eventually pastes text into a case converter at 11pm — usually after pasting it into a Word document first and feeling vaguely dirty about it. The tool seems trivial. It isn't, for two reasons: each case has a specific job, and two of them have traps that surprise people who've used them for years. Here's the whole family, using one example phrase throughout.

One input, eight outputs

Take wedding gift amount calculator through every standard mode:

Mode Output Used for
UPPERCASE WEDDING GIFT AMOUNT CALCULATOR Headlines, warnings, acronyms
lowercase wedding gift amount calculator Cleanup, casual brands
Title Case Wedding Gift Amount Calculator Headings, article titles
Sentence case Wedding gift amount calculator Body text, subtitles
camelCase weddingGiftAmountCalculator JavaScript variables
snake_case wedding_gift_amount_calculator Python, Ruby, SQL columns
kebab-case wedding-gift-amount-calculator URLs, CSS classes, file names
CONSTANT_CASE WEDDING_GIFT_AMOUNT_CALCULATOR Python/JS constants, env vars

The URL row is worth internalizing: search engines treat hyphens as word separators, so kebab-case slugs are the SEO-correct choice — underscores technically concatenate words for Google's tokenizer. Paste any phrase into a slug generator if you also want stop-words stripped.

The two Title Case traps

Trap 1 — small words. Most converter engines (this includes the simple ones and several big-name tools) capitalize every word: "The Lord Of The Rings" instead of "The Lord of the Rings." Chicago and AP style lowercase articles and short prepositions mid-title. Neither is wrong — news headlines capitalize everything, book titles don't — but know which convention you're shipping, and hand-fix the five small words when a style guide is watching.

Trap 2 — accents. Title-case logic usually keys on ASCII word boundaries, so "éclair理论" style words starting with accented letters can keep a lowercase first letter after conversion. UPPERCASE and lowercase modes handle all Unicode fine (café → CAFÉ just works). If your text is multilingual, convert with upper/lower and spot-check the title output.

Why "free download" tools are the wrong instinct

People still search for a case converter free download — an executable, for changing letter case. It's worth being blunt about why browser tools won: nothing to install, nothing that lingers in your registry, works on the office laptop where you can't install software, and your text never leaves the machine (the conversion happens in JavaScript in your tab). A good one keeps working offline once loaded. Bookmark the tab; it outlives every .exe you'd have downloaded. Our case converter does all eight modes live with a single paste — and it's the kind of utility that pairs well with the rest of a browser toolkit rather than a bloated suite install.

Which case belongs where — the short version

  • Body paragraphs: Sentence case. Always. ALL-CAPS PARAGRAPHS read as shouting and measurably reduce reading speed.
  • Headlines: Title Case for articles and blog posts; UPPERCASE sparingly for ad copy — past about six words, caps become noise.
  • Code: match your language's convention — camelCase in JavaScript, snake_case in Python, CONSTANT_CASE for true constants. Consistency beats preference.
  • URLs and file names: kebab-case, lowercase, hyphens over underscores.
  • Email subjects: Sentence case converts better than ALL CAPS in every A/B test you'll find public data for; caps correlate with spam filters too.

One workflow that saves real time

Reformatting a whole document? Convert first, then run the before/after through a text diff checker to confirm only case changed — it catches the accidental deletes and double-spaces that case-cleanup sessions invite. And if the brief has length limits (meta descriptions, ad headlines), a word counter closes the loop.

The humble case converter earns its place the same way every good micro-tool does: it removes a thirty-second task you'd otherwise do by hand a hundred times a year, and it does it without becoming a subscription.

Top comments (0)