Browse Definitions :
Definition

CamelCase

What is CamelCase?

CamelCase is a way to separate the words in a phrase by making the first letter of each word capitalized and not using spaces. It is commonly used in web URLs, programming and computer naming conventions. It is named after camels because the capital letters resemble the humps on a camel's back.

CamelCase is formally referred to as medial capitals. It may also be called or styled as PascalCase, camel case, InterCaps, mixedCase or WikiCase.

The first letter may or may not be capitalized in CamelCase. This difference is called UpperCamelCase and lowerCamelCase. PascalCase always has the first letter capitalized.

Uses of CamelCase

Many companies and technologies use CamelCase to create new words out of existing words that can be registered as trademarks. Some examples of these would be iPhone, AirDrop, DisplayPort, OneDrive, PlayStation, YouTube and TechTarget.

CamelCase naming convention examples
Some examples of the CamelCase naming convention used in company names, product names and programming

When a computer parses text, it treats the spaces as a delimiter between words. CamelCase is most used in places where white space is not allowed for technical reasons. This can make the phrase hard to read or ambiguous. An example of an ambiguous phrase in programming is chartable, which can be interpreted as char table (a table of characters) or chart able (having the ability to be charted). Other ways to remove white space are with dashes called kebab-case or with underscores with snake_case.

Website URLs often use CamelCase to replace spaces. Domain names cannot contain special characters and are not case-sensitive, so most websites write their domain name in CamelCase to make it easier to read and remember. If a space is present in a URL, it needs to use American Standard Code for Information Interchange percent encoding to replace it with %20, which is hard to read and type. Post tagging and #hashtags are often presented in CamelCase for easy readability. Emails may also be presented as CamelCase, such as [email protected].

CamelCase may be used in file names. While most file systems support spaces in file names, there are many reasons why CamelCase is popular. If a file is used on the internet URL, encoding the space in the file name may cause issues. Referring to file names or paths with a space in a command-line interface can be cumbersome and require the use of quotation marks. It is also important to note that some file systems are case-sensitive when referring to files.

CamelCase in computer programming

CamelCase is a popular convention in computer programming and variable names. Generally, variables can be any string of characters without white space. To keep them consistent and readable, it is best practice to establish variable naming conventions within an organization. Some examples of CamelCase variable names would be UserName, BirthDate, intUserAge and strUserName. Kebab-case is discouraged in many computer languages due to the dash being interpreted as a mathematical minus sign.

In some languages, CamelCase is encouraged in the developer documentation best practice. This can be specific to recommendations to using UpperCamelCase -- or PascalCase -- for some instances and lowerCamelCase for other. For example, naming conventions in Java recommend lowerCamelCase for variables, UpperCamelCase for classes and SCREAMING_SNAKE_CASE for constants.

naming conventions in Java
Explore naming conventions in Java programming.

Caution is required as some languages are case-sensitive. Depending on the language, userName and UserName may be interpreted as different variables or as the same one, causing errors. Java, Python and C are case-sensitive, while Basic and Pascal are not case-sensitive.

CamelCase may also be used in other instances such as Extensible Markup Language tags, domain name system names or Windows Active Directory names.

Explore the difference between kebab vs. CamelCase and CamelCase vs. snake case naming conventions.

This was last updated in July 2022

Continue Reading About CamelCase

Networking
  • subnet (subnetwork)

    A subnet, or subnetwork, is a segmented piece of a larger network. More specifically, subnets are a logical partition of an IP ...

  • secure access service edge (SASE)

    Secure access service edge (SASE), pronounced sassy, is a cloud architecture model that bundles together network and cloud-native...

  • Transmission Control Protocol (TCP)

    Transmission Control Protocol (TCP) is a standard protocol on the internet that ensures the reliable transmission of data between...

Security
  • cyber attack

    A cyber attack is any malicious attempt to gain unauthorized access to a computer, computing system or computer network with the ...

  • digital signature

    A digital signature is a mathematical technique used to validate the authenticity and integrity of a digital document, message or...

  • What is security information and event management (SIEM)?

    Security information and event management (SIEM) is an approach to security management that combines security information ...

CIO
  • product development (new product development)

    Product development -- also called new product management -- is a series of steps that includes the conceptualization, design, ...

  • innovation culture

    Innovation culture is the work environment that leaders cultivate to nurture unorthodox thinking and its application.

  • technology addiction

    Technology addiction is an impulse control disorder that involves the obsessive use of mobile devices, the internet or video ...

HRSoftware
  • organizational network analysis (ONA)

    Organizational network analysis (ONA) is a quantitative method for modeling and analyzing how communications, information, ...

  • HireVue

    HireVue is an enterprise video interviewing technology provider of a platform that lets recruiters and hiring managers screen ...

  • Human Resource Certification Institute (HRCI)

    Human Resource Certification Institute (HRCI) is a U.S.-based credentialing organization offering certifications to HR ...

Customer Experience
  • contact center agent (call center agent)

    A contact center agent is a person who handles incoming or outgoing customer communications for an organization.

  • contact center management

    Contact center management is the process of overseeing contact center operations with the goal of providing an outstanding ...

  • digital marketing

    Digital marketing is the promotion and marketing of goods and services to consumers through digital channels and electronic ...

Close