camelCase, snake_case, kebab-case and More: Text Case Types Explained

Programmers, writers and marketers all use different “cases” – ways of capitalising and joining words. Using the right one makes code consistent, headlines look professional and URLs clean. Here is every common case with examples and where it belongs.

Free tool
Convert text case
Convert text to Sentence case, Title Case, UPPER, lower, camelCase, PascalCase, snake_case, kebab-case, CONSTANT_CASE and more in one click. Free.
Open Case Converter →

Programming cases

CaseExampleCommon use
camelCaseuserFirstNameVariables and functions in JavaScript, Java, Kotlin, Swift
PascalCaseUserFirstNameClasses and types; React components; C# methods
snake_caseuser_first_namePython variables and functions, database columns, Ruby
kebab-caseuser-first-nameURLs, CSS classes, file names, HTML attributes
CONSTANT_CASEUSER_FIRST_NAMEConstants and environment variables

Language conventions

  • JavaScript / TypeScript: camelCase for variables, PascalCase for classes and components.
  • Kotlin / Java: camelCase for functions and properties, PascalCase for classes, CONSTANT_CASE for constants. JSON keys from APIs are often snake_case – see JSON to Kotlin.
  • Python: snake_case for functions and variables (PEP 8), PascalCase for classes.
  • CSS: kebab-case class names.

Writing cases

CaseExampleCommon use
Sentence caseHow to make a QR code for freeBody text, many modern headlines and UI buttons
Title CaseHow to Make a QR Code for FreeBook titles, many blog and news headlines
UPPER CASEHOW TO MAKE A QR CODEShort labels and emphasis – avoid for long text
lower casehow to make a qr codeTags, some brand styles

Title Case rules

Most style guides capitalise major words and keep short articles, conjunctions and prepositions lowercase (“a”, “and”, “of”, “to”, “for”) – except as the first or last word. Style guides (AP, Chicago, APA) differ slightly in details.

Cases for the web

Fixing text typed in the wrong case

Caps Lock accidents, shouting headlines and copied database columns are easy to fix: paste the text into the Case Converter and pick the case you need.

FAQ

What is the difference between camelCase and PascalCase?

camelCase starts with a lowercase letter (userName); PascalCase starts with a capital (UserName).

When should I use snake_case?

In Python code, database column names and many APIs.

What is kebab-case?

Words in lowercase joined by hyphens, like user-first-name. It is used in URLs and CSS.

Should headlines be Title Case or Sentence case?

Either can be correct. Choose one style and use it consistently.

What is CONSTANT_CASE?

Uppercase words joined by underscores, used for constants and environment variables.

Free tool
Try the free Case Converter
No signup and nothing uploaded – it runs right in your browser. Browse all 74 free tools on our Free Tools page.
Open Case Converter →

Need a website or app for your business? Talk to Techpass Master – we design and build websites and apps for clients worldwide.

WhatsApp us📞 Call now