textSeptember 22, 2026•3 min read•ToolsHub Editorial Team

Text Case Conventions in Programming: camelCase, snake_case, kebab-case & More

A complete guide to software naming conventions. Master camelCase, PascalCase, snake_case, kebab-case, and CONSTANT_CASE across modern programming languages.

Share guide:X / TwitterLinkedIn
Related Online Tool

Try the Case Converter

Calculate your numbers instantly in your browser. Fast, free, no signup.

Open Tool

Because spaces are illegal in identifiers across virtually all programming languages, software engineers devised structured conventions to join words while maintaining readability.

Choosing the proper case is not merely an aesthetic preference; in modern software engineering, naming conventions communicate architectural intent, variable scope, class definitions, and type hierarchies.


1. camelCase (lowerCamelCase)

In camelCase, words are concatenated together with no spaces or punctuation. The very first word begins with a lowercase letter, and every subsequent word starts with a capital letter:

  • userProfileImage
  • calculateTotalDiscount
  • isAuthenticationActive

Industry Standards:

  • JavaScript / TypeScript: Variables, function declarations, class methods, object properties.
  • Java: Local variables and method signatures.
  • Go: Unexported (package-private) variables and functions.

2. PascalCase (UpperCamelCase)

PascalCase (named after the Pascal programming language) follows camelCase with one key exception: the very first letter is also capitalized:

  • UserProfile
  • PaymentProcessor
  • HttpRequestHandler

Industry Standards:

  • React / Vue / Svelte: Component names (<UserAvatar />).
  • TypeScript / C# / Java: Class names, interfaces, enums, and type definitions.
  • Python: Class declarations (PEP 8 convention).

3. snake_case (Pothole Case)

In snake_case, words are written in all-lowercase and joined by an underscore (_):

  • user_profile_id
  • parse_configuration_file
  • total_active_sessions

Industry Standards:

  • Python: Standard variables, module names, and function names (PEP 8).
  • Rust: Function and variable identifiers.
  • SQL / Relational Databases: Table and column names (created_at, order_status).
  • Ruby: Method and variable names.

4. kebab-case (lisp-case / spinal-case)

In kebab-case, words are written in lowercase and joined by a hyphen or dash (-):

  • user-profile-card
  • main-nav-container
  • btn-primary-lg

Industry Standards:

  • HTML & CSS: Class names, IDs, data attributes (data-tool-id).
  • URLs & Slugs: Clean SEO-friendly URL paths (/blog/mastering-unit-conversions).
  • Package Managers: npm package names and GitHub repository names.

5. CONSTANT_CASE (SCREAMING_SNAKE_CASE)

In CONSTANT_CASE, all letters are capitalized and separated by underscores:

  • API_BASE_URL
  • MAX_RETRY_ATTEMPTS
  • DEFAULT_TIMEOUT_MS

Industry Standards:

  • Global Constants: Immutable global configuration variables in JS, Python, Java, and C++.
  • Environment Variables: .env keys (DATABASE_URL, JWT_SECRET).

Quick Reference Summary

| Convention | Pattern Example | Primary Language Ecosystems | |---|---|---| | camelCase | getUserData | JavaScript, TypeScript, Java, Dart | | PascalCase | UserData | React, C#, TypeScript Interfaces, OOP Classes | | snake_case | get_user_data | Python, Rust, Ruby, SQL Tables | | kebab-case | get-user-data | CSS Classes, URL Slugs, CLI Flags | | CONSTANT_CASE | MAX_USERS | Environment Variables, Global Constants |


Convert Casing in 1-Click

Converting variable names or lists between snake_case, camelCase, kebab-case, and Title Case by hand is tedious. Paste your text into our free Case Converter to transform your text instantly.

AN

ToolsHub Editorial Team

Verified Author

Technical Architect & Lead Developer • ToolsHub Pro

Abdul Nabi is a senior software engineer and technical architect specializing in client-side Web APIs, high-performance browser computing, cryptographic validation, and privacy-first digital utility platforms. All guides on ToolsHub Pro are peer-reviewed for mathematical rigor and developer accuracy.

Published on ToolsHub Pro • 100% Client-Side Free Tools

Recommended Tools

Related Guides