Guide to Programming Naming Conventions: Camel, Snake & Dot Case

Guide to Programming Naming Conventions: Camel, Snake & Dot Case

May 21, 2026

Camel, Snake, and Dots Cases: A Guide to Programming Naming Conventions

In the world of coding, web development, and data management, how you name your variables, files, and functions matters just as much as the logic itself. Since computers don’t handle spaces in code very well, developers and engineers have created several “cases” or naming conventions to keep text readable for humans while keeping it functional for machines.

If you’ve ever wondered why some code looksLikeThis and other code looks_like_this, this comprehensive guide to the “Big 5” naming conventions is for you.

1. Camel Case (camelCase)

Camel case is the standard for naming variables and functions in JavaScript, Java, and many other C-style languages. The first letter of the entire string is lowercase, and each subsequent combined word starts with a capital letter, creating “humps” like a camel.

  • Best for: Variable declarations, function names, and script attributes.
  • Example: userProfileData, calculateTotalAmount

2. Pascal Case (PascalCase)

Often confused with Camel Case, Pascal Case (also known as Upper Camel Case) requires the very first letter of the string to be capitalized as well. Every single word in the phrase begins with an uppercase letter.

  • Best for: Class names, object structures, and constructors in most object-oriented programming languages.
  • Example: UserAuthenticationService, InvoiceTemplate

3. Snake Case (snake_case)

Snake case replaces all spaces between words with underscores. It is the gold standard for Python programming (adhering to PEP 8 rules) and is the most widely preferred method for naming database columns. It keeps text entirely lowercase while ensuring maximum readability.

  • Best for: Database fields, column headers, Python variables, and configuration files.
  • Example: order_registration_date, api_secret_key

4. Kebab Case (kebab-case)

Kebab case uses hyphens (dashes) to separate words, looking like food skewered on a stick. You see this most often in web development. Because URLs, slugs, and CSS classes are much easier to read and parse with dashes, Kebab case is the king of front-end engineering.

  • Best for: URL slugs, SEO-friendly file names, and CSS class names.
  • Example: main-navigation-menu, blog-post-wrapper

5. Dot Case (dot.case)

Dot case replaces spaces with periods. While less common in everyday writing or traditional variable naming, it is a highly functional “mechanical” case. It is heavily utilized in object properties, package directory structures, and configuration keys where a clear system hierarchy needs to be represented.

  • Best for: System properties, log identifiers, translation keys, and object-oriented configuration access.
  • Example: system.memory.usage, auth.login.success

Why Text Case Consistency Matters

Using an automated converter tool like our free case converter tool ensures that your naming conventions remain perfectly consistent across your entire development lifecycle. Seamlessly switching text formats between your database arrays, your API responses, and your front-end scripts saves massive amounts of time and prevents annoying syntax errors that break your code.

Whether you are a student learning your very first coding language or a professional software developer cleaning up a massive legacy database, mastering these text conventions is the hallmark of a clean, efficient engineer.

— Ethan Keen, onlinecaseconvert.com