Need to convert text to any format instantly?

Text Case Converter

Quick reference

FormatExamplePrimary uses
camelCasegetUserNameJS/TS variables, functions, JSON keys
PascalCaseGetUserNameClasses, React/Vue components, C# methods
snake_caseget_user_namePython, Ruby, SQL, Rust variables
kebab-caseget-user-nameHTML, CSS, URLs, file names
CONSTANT_CASEMAX_RETRY_COUNTConstants, env variables, macros
Title CaseGet User NameUI headings, article titles
dot.caseget.user.nameConfig files, Java packages, i18n keys

camelCase

camelCase writes compound words with no spaces. The first word is entirely lowercase; every subsequent word starts with a capital letter. The name comes from the hump-like appearance of the internal capitals.

Where it is used:

camelCase is banned in Python for variables (use snake_case) and in CSS class names (use kebab-case).

PascalCase

PascalCase (also called upper camel case or StudlyCase) capitalises every word including the first: HelloWorld, UserProfile, ApiResponse.

Where it is used:

snake_case

snake_case uses only lowercase letters with underscores as word separators. It was popularised by C and Unix conventions and remains dominant in several modern languages.

Where it is used:

snake_case is highly readable because the underscore acts as a clear, unambiguous word separator. It never creates ambiguity about where one word ends and the next begins — unlike camelCase with acronyms (parseHTMLString vs parseHtmlString).

kebab-case

kebab-case uses only lowercase letters with hyphens as word separators. The name refers to meat on a skewer. It cannot be used for programming identifiers in most languages because the hyphen is the subtraction operator — user-name would be parsed as user minus name.

Where it is used:

CONSTANT_CASE

CONSTANT_CASE (also called SCREAMING_SNAKE_CASE or UPPER_SNAKE_CASE) uses all uppercase letters with underscores. It visually signals that a value never changes.

Where it is used:

dot.case

dot.case uses lowercase letters with dots as separators. It is not used in mainstream programming identifiers but appears in several specific contexts:

Language-by-language cheatsheet

LanguageVariables / functionsClassesConstantsFiles
JavaScriptcamelCasePascalCaseCONSTANT_CASEkebab-case
TypeScriptcamelCasePascalCaseCONSTANT_CASEkebab-case
Pythonsnake_casePascalCaseCONSTANT_CASEsnake_case
JavacamelCasePascalCaseCONSTANT_CASEPascalCase
C#camelCase (private) / PascalCase (public)PascalCasePascalCasePascalCase
Rubysnake_casePascalCaseCONSTANT_CASEsnake_case
Rustsnake_casePascalCaseCONSTANT_CASEsnake_case
CSSkebab-casekebab-case
SQLsnake_caseCONSTANT_CASE

Frequently asked questions

Which case should I use for REST API endpoints?

kebab-case is recommended for URL paths: /api/user-accounts/. For JSON request and response bodies, camelCase is standard when the API is consumed by JavaScript. Python APIs (Django REST Framework, FastAPI) often return snake_case. Check what your frontend expects and be consistent.

Does Google prefer kebab-case or underscores in URLs?

Google officially treats hyphens in URLs as word separators. Underscores do not separate words — hello_world is treated as one word by Google. Use kebab-case for all URL slugs for better SEO.

Can I mix cases in one file?

Yes, and you often must. A JavaScript file routinely uses camelCase for variables, PascalCase for classes, CONSTANT_CASE for constants, and kebab-case for CSS class names in JSX. The key is using each convention for its intended purpose consistently.

What is Title Case vs Sentence case?

In Title Case, every word starts with a capital letter: "The Quick Brown Fox". In Sentence case, only the first word and proper nouns are capitalised: "The quick brown fox". Title Case is standard for English headings and article titles; Sentence case is preferred for UI labels and button text in most style guides.

Convert your text to any case format instantly.

Open Text Case Converter

Related tools