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
  • local area network (LAN)

    A local area network (LAN) is a group of computers and peripheral devices that are connected together within a distinct ...

  • TCP/IP

    TCP/IP stands for Transmission Control Protocol/Internet Protocol and is a suite of communication protocols used to interconnect ...

  • firewall as a service (FWaaS)

    Firewall as a service (FWaaS), also known as a cloud firewall, is a service that provides cloud-based network traffic analysis ...

Security
  • identity management (ID management)

    Identity management (ID management) is the organizational process for ensuring individuals have the appropriate access to ...

  • fraud detection

    Fraud detection is a set of activities undertaken to prevent money or property from being obtained through false pretenses.

  • single sign-on (SSO)

    Single sign-on (SSO) is a session and user authentication service that permits a user to use one set of login credentials -- for ...

CIO
  • IT budget

    IT budget is the amount of money spent on an organization's information technology systems and services. It includes compensation...

  • project scope

    Project scope is the part of project planning that involves determining and documenting a list of specific project goals, ...

  • core competencies

    For any organization, its core competencies refer to the capabilities, knowledge, skills and resources that constitute its '...

HRSoftware
  • recruitment management system (RMS)

    A recruitment management system (RMS) is a set of tools designed to manage the employee recruiting and hiring process. It might ...

  • core HR (core human resources)

    Core HR (core human resources) is an umbrella term that refers to the basic tasks and functions of an HR department as it manages...

  • HR service delivery

    HR service delivery is a term used to explain how an organization's human resources department offers services to and interacts ...

Customer Experience
  • martech (marketing technology)

    Martech (marketing technology) refers to the integration of software tools, platforms, and applications designed to streamline ...

  • transactional marketing

    Transactional marketing is a business strategy that focuses on single, point-of-sale transactions.

  • customer profiling

    Customer profiling is the detailed and systematic process of constructing a clear portrait of a company's ideal customer by ...

Close