About Case Converter
Case Converter is a free online developer tool to convert words or text to any case instantly. Supported cases are as the following. The button names indicate how the result will look like.
lowercase - Converts the input string to lowercase. For example, case converter.
UPPERCASE - Converts the input string to uppercase. For example, CASE CONVERTER.
camelCase - Converts the input string to camel case with the first word in lowercase followed by the next word capitalized with no spaces in between. For example, caseConverter. Commonly used for naming variables and functions.
Capital Case - Converts the input string to capital case with each word capitalized separated by a space. For example, Case Converter.
CONSTANT_CASE - Converts the input string to constant case with each word in uppercase and separated by an underscore. For example, CASE_CONVERTER. Commonly used for naming constants in programming.
dot.case - Converts the input string to dot case with each word in lowercase and separated by a dot. For example, case.converter. Commonly used for accessing an object's properties in programming.
kebab-case - Converts the input string to kebab case with each word in lowercase and separated by a dash. For example, case-converter. Commonly used for naming URL slugs. Also known as kebab case.
PascalCase - Converts the input string to pascal case with the first letter of each word in uppercase and no spaces in between. For example, CaseConverter. Commonly used for naming classes in OOP programming.
path/case - Converts the input string to path case with each word in lowercase and separated by a slash. For example, case/converter. Used for naming *nix paths and URLs.
Sentence case - Converts the input string to sentence case with each word capitalized and separated by a space. For example, Case converter. Sentence case is simply for formatting a string to a normal sentence in English.
snake_case - Converts the input string to snake case with each word in lowercase and separated by an underscore. For example, case_converter. Commonly used for naming variables, functions, and files.
sWAP cASE - Converts the input string to swap case with the case of each letter swapped from lowercase to uppercase and vice versa. For example, cASE cONVERTER. Converts lowercase to uppercase and vice versa.
Train-Case - Converts the input string to header case with the first letter of each word in uppercase and separated by a dash. For example, Case-Converter.
What is lowercase?
Lowercase is a typeface of small letters which is opposed to uppercase or capital letters abbreviated as LC. Lowercase is the default letter case used when typing unless the shift key is pressed or the caps lock key is on.
For instance, a is the lowercase of A, b is the lowercase of B, c is the lowercase of C, and so on.
In computer programming, there exists the toLowerCase method or something similar for converting a string to lowercase in most programming languages. For example, the code below demonstrates how to convert a string to lowercase in JavaScript.
const str = 'Case Converter'
console.log(str.toLowerCase()) // case converter
What is uppercase?
Uppercase is a typeface of capital letters which is opposed to lowercase or small letters abbreviated as UC. Uppercase can be toggled by pressing the shift key or activating the caps lock key.
For example, A is the uppercase of a, B is the uppercase of b, C is the uppercase of c, and so on.
Similar to lowercase, the method for converting a string to uppercase is also provided in most programming languages. The following example shows how to convert a string to uppercase in JavaScript using the built-in toUpperCase method.
const str = 'Case Converter'
console.log(str.toUpperCase()) // CASE CONVERTER
What is camel case?
Camel case is a naming convention that the first letter of each word is capitalized except for the first one with no spaces in between. In computer programming, camel case is often used for naming variables and functions.
For instance, Add User becomes addUser, Validate Email becomes validateEmail, and Last Visited becomes lastVisited when converted to camel case.
This is an example of a naming convention that uses camel case to name variables and functions in JavaScript.
function getFullName(firstName, lastName) {
const fullName = `${firstName} ${lastName}`
return fullName
}
What is pascal case?
Pascal case is a naming convention that every word is capitalized with no spaces in between. Pascal case is a type of camel case and mostly used for naming classes and constructors in programming.
For example, Mobile Phone becomes MobilePhone, Post Button becomes PostButton, and Animal becomes Animal when converted to pascal case.
The code below is an example of naming classes and constructors in pascal case.
class CaseConverter {
// Properties and methods of the CaseConverter class go here.
}
const caseConverter = new CaseConverter()
What is constant case?
Constant case is a naming convention that every word is capitalized and split by an underscore _ with no spaces in between. Constant case is mostly used in programming for naming constant variables that their values will never change also known as screaming snake case.
For instance, Min Length becomes MIN_LENGTH, Max File Size becomes MAX_FILE_SIZE, and Port becomes PORT when converted to constant case.
The following demonstrates the use of constant case for naming constant variables in JavaScript.
const MIN_PASSWORD_LENGTH = 8
const PATH_SEPARATOR = ':'
const PORT = 3000
const DEV = process.env.NODE_ENV !== 'production'
What is param case?
Param case is a naming convention that all the words are in lowercase and split by a dash - with no spaces in between also known as kebab case. Param case is mostly used for naming URL slugs as it's easy to read for both humans and bots and good for SEO as well as CSS properties, file names, and more.
For example, Login Button becomes login-button, How to Pet Cats becomes how-to-pet-cats, and To-Do List becomes to-do-list when converted to param case.
The following is the URL of this page that the slug is in param case; i.e. case-converter.
https://appdevtools.com/case-converter
What is snake case?
Snake case is a naming convention that all the words are in lowercase and split by an underscore _ with no spaces in between. Snake case is often used for naming variables in programming just like camel case depending on the preference.
For instance, Country Name becomes country_name, IP Address becomes ip_address, and Creation Date becomes creation_date when converted to snake case.
The following is an example of naming variables in snake case in JavaScript.
const first_name = 'Case'
const last_name = 'Converter'
const full_name = `${first_name} ${last_name}`
console.log(full_name) // Case Converter