0 characters · 0 words

All Conversions

Read only. Click Copy to use a conversion.

lowercase all characters in their small form
UPPER CASE all characters in their capital form
Title Case first letter of every word capitalized
Sentence case only the first character is capitalized
camelCase first word lowercase, subsequent words capitalized, no separator
PascalCase every word capitalized, no separator (also called UpperCamelCase)
snake_case all lowercase, words joined by underscores
kebab-case all lowercase, words joined by hyphens
CONSTANT_CASE all uppercase, words joined by underscores (SCREAMING_SNAKE_CASE)

About Case Converter

Programming languages, file systems, and APIs each have their own conventions for combining words into identifiers. JavaScript and Java prefer camelCase; Python and C favor snake_case; CSS and URL slugs use kebab-case; constants in many languages are written in CONSTANT_CASE. This tool converts any input into all eight common forms simultaneously so you can paste once and pick the one your context needs.

Conversion happens entirely in your browser. The input is split into words using whitespace, hyphens, underscores, and case transitions (so helloWorld splits into hello and World, not one mangled word). Each output is generated from the same word list, so they remain consistent: helloWorldJS produces hello_world_js in snake_case and hello-world-js in kebab-case.

How Word Splitting Works

The splitter handles four word separators: spaces, hyphens, underscores, and case transitions. The input helloWorld is split on the boundary between lowercase-W (lowercase letter followed by uppercase letter) into hello and World. The input XMLParser is split between consecutive uppercase letters followed by a lowercase letter (XML + Parser) so the all-caps acronym is preserved. The input hello-world_example is split on each non-alphanumeric character. The result is a list of words that each case conversion can manipulate independently.

Which Convention to Use When

  • camelCase: JavaScript / TypeScript variables, methods, and object properties. Java instance methods. The convention in most modern web stacks.
  • PascalCase: JavaScript / TypeScript classes and React components. Java classes. C# methods and types. The convention for “constructor” or “type” identifiers.
  • snake_case: Python variables, functions, and module names. C functions and variables. Ruby symbols. The original C convention before camelCase became popular.
  • kebab-case: CSS class names and HTML attributes. URL slugs. CLI flags (--dry-run). The convention for human-readable identifiers.
  • CONSTANT_CASE: Compile-time constants in C, C++, Java, JavaScript, and Go. Environment variable names. SQL column names in some style guides.

Case Conversion in Data Pipelines

Beyond naming conventions, case conversion is a routine data cleaning operation. When you ingest a CSV from a third party, the column names may be in any case (First Name, first_name, firstName, FIRSTNAME). Before you can join them to your own table, you need to normalize them — typically to snake_case, which is the most database-friendly. The Case Converter can normalize one column at a time, but for batch conversions you would usually write a script that processes every header in one pass.

Common Pitfalls

  • Acronyms in PascalCase. XMLParser should remain XMLParser, not XmlParser. This tool treats consecutive uppercase letters as a single acronym and preserves it.
  • Mixed case in a single word. The input iPhone is ambiguous: it could be i + Phone or a single word. The tool prefers the first interpretation (i.e., i + Phone) because that matches the convention Apple uses.
  • Numbers in identifiers. The input html5Parser splits into html5 + Parser. The number is preserved as part of the word, which is the convention in most languages.
  • Punctuation other than hyphens or underscores. The input hello.world splits into hello + world because . is treated as a word separator. This is the most useful default but may not match every convention.

Frequently Asked Questions

What is the difference between camelCase and PascalCase?

camelCase starts the first word lowercase (myVariable); PascalCase starts every word capitalized, including the first (MyVariable). PascalCase is sometimes called UpperCamelCase; camelCase is sometimes called lowerCamelCase.

What is the difference between snake_case and CONSTANT_CASE?

snake_case is all lowercase (my_variable); CONSTANT_CASE is all uppercase (MY_VARIABLE). CONSTANT_CASE is sometimes called SCREAMING_SNAKE_CASE or UPPER_SNAKE_CASE.

Does this convert non-English characters?

Yes. The splitter treats any non-ASCII letter as part of a word (Unicode letter categories L&Lu, L&Ll, L&Lt, L&Lm, L&Lo). The case conversions respect each character’s own uppercase and lowercase mappings. The input café becomes CAFÉ in UPPER and café in lowercase; the input ß becomes SS in UPPER (because the German eszett uppercases to a double-S).

When should I use Title Case vs Sentence case?

Title Case capitalizes the first letter of every word (every word treated as a proper noun, like headlines and book titles). Sentence case capitalizes only the first letter of the entire input (like the first word of a sentence). For headings, use Title Case; for prose, use Sentence case.

Why does the tool sometimes give a different result than my IDE?

Different tools use different word-splitting rules. IntelliJ and Resharper have a configurable split on digit transitions; some linters treat consecutive uppercase letters as separate words; R by default converts to period.case. This tool uses the most common convention: split on whitespace, hyphens, underscores, periods, and case transitions. If you need a different convention, paste the input into your tool of choice and configure the splitter there.