Case Converter

Convert text to any case format — UPPERCASE, lowercase, Title Case, Sentence case, camelCase, PascalCase, snake_case, or kebab-case — instantly in your browser.

UPPERCASE
HELLO WORLD
All letters converted to capitals. Common for headings, constants, and labels.
lowercase
hello world
All letters converted to small letters. Common for email addresses and usernames.
Title Case
Hello World
First letter of each word capitalised. Standard for headings and proper nouns.
Sentence case
Hello world
First letter of the first word capitalised. Standard for sentences and descriptions.
camelCase
helloWorld
First word lowercase, each subsequent word starts with a capital. Used for variables and functions in JS.
PascalCase
HelloWorld
Every word starts with a capital, no separators. Used for class names and constructors.
snake_case
hello_world
All lowercase, words separated by underscores. Standard for Python variables and SQL column names.
kebab-case
hello-world
All lowercase, words separated by hyphens. Standard for CSS class names and URL slugs.

Text Case Formats Explained

Programming Cases

Different programming languages and contexts have established conventions for naming variables, functions, classes, and files. Using the wrong case breaks conventions and can cause actual runtime errors in case-sensitive languages.

Writing Cases

Frequently Asked Questions

Use kebab-case (e.g. .main-navigation, .user-card). The HTML and CSS specification and every major CSS methodology (BEM, SMACSS, OOCSS) use hyphens as word separators. Note that HTML is case-insensitive for class names, but CSS is case-sensitive by default, so be consistent. Avoid camelCase in CSS — it is error-prone and non-idiomatic.

Both join words without separators, capitalising word boundaries. The difference is the first character: camelCase starts with a lowercase letter (myFunction), while PascalCase starts with an uppercase letter (MyFunction). In JavaScript, use camelCase for variables and functions, PascalCase for classes and React components.

Python's official style guide (PEP 8) mandates snake_case for function and variable names because Guido van Rossum, Python's creator, believed it improved readability for English readers. Python does use PascalCase for class names (also per PEP 8). snake_case is also the default in Ruby, PHP (for array keys), and SQL column names.

Use a regex replace: str.replace(/_([a-z])/g, (_, c) => c.toUpperCase()). For example, 'user_first_name'.replace(/_([a-z])/g, (_, c) => c.toUpperCase()) produces 'userFirstName'. To go from camelCase to snake_case: str.replace(/([A-Z])/g, '_$1').toLowerCase().