Text Case Styles Explained: camelCase, snake_case, kebab-case & More
A practical guide to the most common text case styles — when to use each one and how to convert between them instantly.
Every developer has copy-pasted a heading into code and had to manually reformat it as camelCase or snake_case. Every writer has wondered whether a word in a title should be capitalised. Case conventions show up everywhere — in code, in content, in URLs — and getting them wrong causes real problems.
The eight case styles
UPPER CASE — every letter capitalised. Used for acronyms (NASA, URL), constants in code (MAX_RETRIES), and section headings that need emphasis.
lower case — every letter small. Common in filenames, some programming styles, and CSS class names.
Title Case — first letter of each word capitalised. Standard in English book titles, film names, and article headings. Style guides disagree on whether short words like “and” or “the” should be capitalised — the converter capitalises every word for simplicity.
Sentence case — only the first word capitalised, like normal prose. Modern style guides (Google, AP, most SaaS products) prefer this for UI copy, headings, and button labels.
camelCase — words joined with no spaces; first word lowercase, each subsequent word starts with a capital. The standard for variable and function names in JavaScript, Java, and Swift.
PascalCase — same as camelCase but the first letter is also capitalised. Used for class names, React components, TypeScript interfaces, and C# types.
snake_case — words joined with underscores, everything lowercase. The convention for Python variables and functions, Ruby methods, and database column names.
kebab-case — words joined with hyphens, everything lowercase. Standard for CSS class names, HTML data attributes, URL slugs, and filenames.
Why consistency matters
Mixing case styles in a codebase is a common source of bugs. A JavaScript object key userId is not the same as user_id — one silently returns undefined while the other works. Picking one style per context (camelCase for JS variables, snake_case for DB columns, PascalCase for classes) eliminates an entire category of typo-related errors.
In URLs, kebab-case is what Google recommends. Search engines treat hyphens as word separators, which improves keyword recognition. belun.app/text/text-case-converter is better for SEO than belun.app/text/textCaseConverter.
Choosing the right style
Follow the language convention first. Python enforces PEP 8, so snake_case; most JS/TS linters default to camelCase for variables and PascalCase for constructors. When working across a content system — say your CMS uses kebab-case slugs — make sure filenames match, or you’ll spend time debugging 404s that shouldn’t exist.
For UI copy, sentence case reads faster than title case. Research from UX teams at Google and Apple consistently shows this, and most modern product teams have moved that direction.
One thing worth noting about UPPER CASE: use it for constants and acronyms, not for general emphasis. A paragraph with three ALL-CAPS words reads like shouting.
Converting case quickly
The Text Case Converter handles all eight styles in your browser with no signup. Paste your text, click a button, copy the result. Everything runs client-side — nothing is sent to a server.
It also handles mixed input. Paste theQuickBrownFox (camelCase) and click snake_case, and it correctly splits on the capital letters to produce the_quick_brown_fox. Same logic applies when converting from kebab-case or PascalCase to anything else.
Try the Text Case Converter — paste any text and switch between UPPER, lower, Title, Sentence, camelCase, PascalCase, snake_case, and kebab-case in one click.