What is the Case Converter?
This case converter changes the capitalisation of any text in one click. It covers both writing styles and programming naming conventions:
- Title Case capitalises major words and keeps short words like and, of and the lowercase, as in AP and Chicago style headlines. Sentence case capitalises only the first letter of each sentence.
- camelCase (JavaScript and Java variables), PascalCase (class names), snake_case (Python, databases), kebab-case (URLs, CSS classes) and CONSTANT_CASE (constants and environment variables).
The programming cases split words intelligently. XMLHttpRequest, user_id, first-name and "Hello World" are all broken into words before they are converted, so you can convert straight from one naming style to another. Each line is converted separately, and accented letters are supported.
How to use the Case Converter
- Paste your text into the box.
- Click the case you want. The text is converted in place.
- Click another case to convert again, or Undo to go back. Copy when you are done.
Frequently asked questions
What is the difference between camelCase and PascalCase?
Both join words without spaces and capitalise each new word. camelCase starts with a lowercase letter (userName), PascalCase starts with an uppercase letter (UserName).
Which words stay lowercase in Title Case?
Articles (a, an, the), short conjunctions (and, but, or, nor) and short prepositions (at, by, for, in, of, on, to, via, with), unless they are the first word or follow a colon.
When should I use snake_case vs kebab-case?
snake_case is common in Python, Ruby and SQL column names. kebab-case is used in URLs, CSS class names and command-line flags, because hyphens are not allowed in most programming-language identifiers.