Do you know kebab-case? And what about snake-case?
NicolasBrondinBernard
A quick overview of naming conventions when it comes to character casing!

Article published on 28/07/2020, last updated on 09/08/2026
I believe naming conventions are undoubtedly one of the first things you learn as a developer, they don't stop at how characters are arranged, but that's what we're going to focus on today.
Naming conventions primarily serve to:
- collaborate more easily and avoid mistakes when working on a project
- create readable and consistent code
- make getting to grips with a codebase as intuitive as possible
When I talk with developers, especially juniors, I get the impression that there's only one way to write code: camelCase and nothing else!
Yet the horizon is much wider than that, so let's take a tour to see what exists, why, and how we can use it.
Camel Case
Example: theUnicorn
The purpose of camel case, like all the other conventions described in this article, is to write several words together without using a space, while keeping the readability of separated words.
Its name comes from the fact that the capital letter at the beginning of each word gives it a resemblance to a camel and its humps. It's the most well-known naming convention, and it's even present in brands like iPhone or eBay.
Several programming languages define it as the default convention (in Java and Javascript, for example) for naming variables and functions.
When used outside of computing, the first word is capitalized, but in programming the first letter is lowercased, otherwise we call it "Pascal Case."
Pascal Case
Example: AwesomeNinja
"Pascal Case" is a variant of "Camel Case" that introduces a capital letter at the beginning of the first word; it's notably this variant that is used to name classes or modules in various languages.
The word "Pascal" comes from the programming language of the same name created in 1970, which used this naming convention notably for its programs, modules, and types as indicated here.
FunFact: There's a more restrictive variant of this convention called "WikiCase" which requires that every capital letter be followed by a lowercase letter, forbidding words like "ReadABook" or "parsePHP."
Snake Case
Example: an_easy_diy
This is notably the naming convention for variables and functions in C as well as in Python.
Personally, it's the one I also use for the projects I lead in Javascript.
Snake case offers two advantages:
- It eliminates writing ambiguities with acronyms (in camel case you might write XMLHTTPConnection or XmlHttpConnection).
- It reads faster than camel case, as shown by this Kent State University study
But it's true that the number of characters to write and transmit is greater, so it's up to you whether you prefer to prioritize writing speed over reading ease!
Kebab Case
Example: just-a-steack
Since the hyphen isn't accepted by the syntax of most programming languages, you won't find it directly in code, however kebab case remains the standard when it comes to naming resources on the web.
For a regular visitor, it's more natural to read, but especially for search engines it's essential to maintain a real separation between words in order to optimize SEO.
For a crawler, the URL "/notreequipe/contacteznous.html" won't contain any recognizable keyword, unlike the URL "/notre-equipe/contactez-nous.html".
Flat Case
Example: idontlikespace
The only example of flat case that came to mind while writing this article is Java packages, which are named "com.android.mybeautifulapp".
The dots aren't part of the naming, but of the package hierarchy.
I wouldn't recommend anyone use it outside of this case, because doing so means losing all the benefit of the previous naming conventions, that is, the visual separation of words.
Upper Case
Example: SIMPLY_GLOBAL
You can find upper case with or without underscores, but it's generally encountered less frequently than the others because this convention is "reserved" for declaring global variables, constants, or sometimes enumerations.
The fact that it stands out compared to the rest of the code makes it much easier to spot.
Conclusion
What matters most is sticking to a naming convention. You're free to choose your convention on your projects, but you absolutely must respect the one already established on the project you're going to collaborate on!
For certain conventions, such as Pascal Case for class names, it's still preferable to stick with it because it's a consensus across all languages and communities.
Complete courses, exercises and certificates to really learn programming!
4.8 average rating
No comments yet