Loading...
Loading...
Free online case converter. Convert text between camelCase, PascalCase, snake_case, kebab-case, and UPPER_CASE instantly.
Case conversion is a common need in programming and writing. Different programming languages, frameworks, and conventions use different naming styles. Converting between these formats saves time and prevents errors when migrating code between projects that follow different naming conventions.
camelCase (also called lower camel case) starts with a lowercase letter and capitalizes the first letter of each subsequent word. It is widely used in JavaScript, Java, and TypeScript for variable and function names. PascalCase is similar but starts with an uppercase letter — common for class names in most object-oriented languages.
snake_case uses underscores between words, all lowercase. It is the standard for Python variable/function names, Ruby symbols, database column names, and environment variables. UPPER_CASE (SCREAMING_SNAKE_CASE) is used for constants in most languages. kebab-case uses hyphens and is standard for URL slugs, CSS class names, and HTML data attributes.
The conversion between cases works by identifying word boundaries. For camelCase and PascalCase, each uppercase letter signals a new word. In snake_case and kebab-case, underscores and hyphens indicate boundaries. Converting from camelCase to snake_case requires inserting an underscore before each uppercase letter and converting to lowercase.
This converter handles five common formats: camelCase, PascalCase, snake_case, kebab-case, and UPPER_CASE. Each conversion runs in real-time as you type. Use it when adopting a new project's naming conventions, preparing API parameters, or ensuring consistent variable naming across your codebase.
Naming conventions are deeply tied to programming language culture and ecosystem. Go uses camelCase for exported functions (capitalized = exported) and discourages underscores entirely. Rust uses snake_case for functions and variables but PascalCase for types and traits. Ruby prefers snake_case for methods and variables with PascalCase for classes and modules. Understanding these conventions helps you read and write idiomatic code in each language, making your code more natural to other developers in the ecosystem.
camelCase starts with a lowercase letter (e.g., firstName, getData). PascalCase starts with an uppercase letter (e.g., FirstName, GetData). The term 'camelCase' gets its name from the humps created by uppercase letters; PascalCase refers to the Pascal programming language's naming convention.
Follow the convention of your programming language and framework. JavaScript/TypeScript uses camelCase for variables/functions and PascalCase for classes. Python uses snake_case for everything except classes (PascalCase). SQL uses snake_case for columns. CSS uses kebab-case for class names. Consistency within a project is more important than the specific choice.
Acronyms are a common challenge. For example, 'parseJSON' should convert to 'parse_json', not 'parse_j_s_o_n'. Most conversion logic treats consecutive uppercase letters as an acronym and keeps them together. Our converter follows this convention for accurate results.
Go uses camelCase for all identifiers, with the first letter's case indicating visibility — capitalized means exported (public), lowercase means unexported (private). Go's convention explicitly discourages snake_case and underscores, making it one of the few languages that enforces a single naming style throughout the ecosystem.
Most modern IDEs offer built-in or plugin-based case conversion. VS Code extensions like 'Change Case' support multiple formats. IntelliJ IDEA has 'Toggle Case' and camelCase-aware selection. For bulk conversions across many files, command-line tools like sed with regex patterns or dedicated tools like rename (Perl-based) can batch convert identifiers in source code.