Case Converter
Type or paste text and see all case formats simultaneously — camelCase, PascalCase, snake_case, kebab-case, CONSTANT_CASE, and more. Click any result to copy.
Case formats and when to use them
camelCasemyVariableNameJavaScript/TypeScript variables and function names. The dominant convention in JS codebases.
PascalCaseMyClassNameClass names, React components, TypeScript interfaces and types. Also called UpperCamelCase.
snake_casemy_variable_namePython variables and functions, Ruby, SQL column names, and many configuration file keys.
kebab-casemy-css-classCSS class names, HTML attributes, URL slugs, and CLI flags. The most URL-friendly format.
CONSTANT_CASEMY_CONSTANT_VALUEEnvironment variables, constants in most languages, and configuration keys in .env files.
Title CaseMy Page TitleHeadings, article titles, button labels, and navigation items in UI copy.
Frequently asked questions
How does the converter split words in camelCase or PascalCase input?
The converter detects transitions between lowercase and uppercase letters (camelCase → camel Case) and between runs of uppercase followed by lowercase (HTMLParser → HTML Parser). It also splits on existing separators like spaces, hyphens, and underscores. This means myHTMLParser → ['my', 'HTML', 'Parser'] → my-html-parser in kebab-case.
What is the difference between camelCase and PascalCase?
Both concatenate words with no separator and capitalize each word's first letter — except the first word. camelCase keeps the first word lowercase (myVariable). PascalCase (also called UpperCamelCase) capitalizes the first word too (MyVariable). PascalCase is used for class names; camelCase for variables and functions.
Which case style should I use for CSS class names?
kebab-case (my-component-name) is the universal standard for CSS class names. The BEM convention extends this to block__element--modifier. Avoid camelCase in CSS — the dash character is valid in CSS identifiers but not in most programming language identifiers, so CSS specifically evolved toward kebab-case.
What is dot.case used for?
Dot notation (config.database.host) is common in configuration files (Java .properties, Python configparser), logging namespaces, and some NoSQL document paths. It's also used for package names in Java and namespace prefixes in some frameworks.
How do I handle acronyms like 'HTML' or 'API' in case conversion?
Convention varies: some codebases write htmlParser (treat acronyms as lowercase), others write HTMLParser (preserve acronym caps). This tool treats uppercase runs as a single token, so HTMLParser → html-parser in kebab-case. If you want HTML preserved as a unit in snake_case, write it as html_parser manually after converting.
Related Tools
All conversions run in your browser — nothing is uploaded.
Browse all 26 converters →