Use Camel Case Converter

Enter your data below to use the Camel Case Converter

📌 Try these examples:
RESULT

Last updated

Naming Conventions in Programming

Different programming languages and frameworks have established conventions for naming variables, functions, classes, and files. Using the wrong convention in a codebase is a code smell — it signals unfamiliarity with the language or inconsistency in the team's style. This converter handles all the major conventions instantly.

The Main Naming Conventions

ConventionExampleUsed in
camelCasegetUserNameJavaScript variables & functions, Java methods
PascalCaseUserProfileClasses in most languages, React components, C# methods
snake_caseuser_namePython variables & functions, Ruby, SQL columns, C
SCREAMING_SNAKEMAX_RETRY_COUNTConstants in Python, Java, C/C++
kebab-caseuser-profileCSS classes, HTML attributes, URL slugs, Lisp
dot.caseuser.profileConfig keys (Spring Boot, .NET), Lua

Language-Specific Rules

Converting Between Cases in Code

JavaScript
// snake_case → camelCase
const toCamel = s => s.replace(/_([a-z])/g, (_, c) => c.toUpperCase());
toCamel('user_first_name'); // → "userFirstName"

// camelCase → snake_case
const toSnake = s => s.replace(/[A-Z]/g, c => '_' + c.toLowerCase());
toSnake('userFirstName'); // → "user_first_name"

// camelCase → kebab-case
const toKebab = s => s.replace(/[A-Z]/g, c => '-' + c.toLowerCase());
toKebab('userFirstName'); // → "user-first-name"

// Any → PascalCase
const toPascal = s => s
  .replace(/[-_\s]+(.)/g, (_, c) => c.toUpperCase())
  .replace(/^(.)/, c => c.toUpperCase());
toPascal('user_first_name'); // → "UserFirstName"
ℹ️

Most linters enforce naming conventions automatically. ESLint has a camelcase rule, Python's flake8 uses PEP 8 naming checks, and Go's golint flags non-idiomatic names. Setting these up in your CI pipeline prevents naming inconsistencies from ever reaching the codebase.

Frequently Asked Questions

Simply enter your data, click the process button, and get instant results. All processing happens in your browser for maximum privacy and security.