Case Converter
Convert text between camelCase, PascalCase, snake_case, kebab-case, UPPERCASE, and lowercase naming conventions
Type or paste text β all case conversions appear instantly below
Converting Text Between Naming Conventions
Naming conventions vary across programming languages, frameworks, and contexts β JavaScript uses camelCase for variables, Python uses snake_case, CSS uses kebab-case, constants use SCREAMING_SNAKE_CASE, and class names use PascalCase. When working across multiple technologies, converting between these conventions is a frequent need: renaming database columns from snake_case to camelCase for JavaScript APIs, converting component names between frameworks, or transforming configuration keys between formats. The Case Converter handles bidirectional conversion between all major naming conventions with automatic case detection.
Type or paste text in any naming convention and see it instantly converted to all other formats. The tool automatically detects the input case format and splits words correctly β handling edge cases like consecutive uppercase letters in acronyms (HTMLParser β html-parser), numeric boundaries (user2name β user-2-name), and mixed conventions. All processing happens instantly in your browser.
Supported Naming Conventions
The converter supports all major programming naming conventions:
- camelCase: First word lowercase, subsequent words capitalized β standard for JavaScript/TypeScript variables, Java methods, and JSON properties
- PascalCase (UpperCamelCase): All words capitalized β used for class names in most languages, React components, and C# methods
- snake_case: Words separated by underscores, all lowercase β standard for Python, Ruby, Rust variables, and database columns
- kebab-case (dash-case): Words separated by hyphens, all lowercase β used for CSS classes, HTML attributes, URL slugs, and CLI flags
- SCREAMING_SNAKE_CASE: Words separated by underscores, all uppercase β used for constants and environment variables
- lowercase: All characters lowercase with no separator β used for package names and some identifiers
Word Boundary Detection
The converter intelligently detects word boundaries in any input format:
- Case transitions:
myVariableNameβ splits at lowercase-to-uppercase transitions - Separator characters:
my-variable-nameormy_variable_nameβ splits at separators - Acronym handling:
HTMLParserβ ["HTML", "Parser"] (keeps acronyms together) - Numeric boundaries:
user2accountβ optionally splits at number-letter transitions - Mixed input:
my-camelCase_mixedβ handles inconsistent input gracefully
This intelligent splitting ensures that acronyms, numbers, and mixed-case inputs produce sensible conversions across all target formats.
Use Cases Across Development Workflows
Common scenarios where case conversion saves time:
- API development: Converting database column names (snake_case) to JSON response keys (camelCase)
- React development: Converting HTML attributes (kebab-case like
class-name) to JSX props (camelCase likeclassName) - Environment variables: Converting config keys to SCREAMING_SNAKE_CASE for .env files
- File naming: Converting component names (PascalCase) to file names (kebab-case) following framework conventions
- Database migrations: Renaming columns between language-native conventions
- Code generation: Transforming schema field names into language-appropriate identifiers for generated code
The tool is particularly valuable when refactoring codebases that must maintain consistency across multiple naming conventions, such as a full-stack project where the frontend uses camelCase, the database uses snake_case, and environment configuration uses SCREAMING_SNAKE_CASE.
Code Examples
Conversion Examples Across All Formats
// Input: "getUserAccountData"
// Detected: camelCase
// Conversions:
// camelCase: getUserAccountData
// PascalCase: GetUserAccountData
// snake_case: get_user_account_data
// kebab-case: get-user-account-data
// SCREAMING_SNAKE: GET_USER_ACCOUNT_DATA
// lowercase: getuseraccountdata
// Acronym handling:
// Input: "parseHTMLDocument"
// camelCase: parseHtmlDocument
// PascalCase: ParseHtmlDocument
// snake_case: parse_html_document
// kebab-case: parse-html-document
// SCREAMING_SNAKE: PARSE_HTML_DOCUMENT
// Practical use β API response mapping:
const dbColumns = ['user_id', 'first_name', 'created_at'];
const jsKeys = dbColumns.map(col =>
col.replace(/_([a-z])/g, (_, c) => c.toUpperCase())
);
// Result: ['userId', 'firstName', 'createdAt'] Frequently Asked Questions
What is the difference between camelCase and PascalCase?
camelCase starts with a lowercase letter and capitalizes the first letter of each subsequent word (e.g., myVariableName). PascalCase capitalizes the first letter of every word including the first one (e.g., MyVariableName). In most languages, camelCase is used for variables and functions, while PascalCase is used for class names and type definitions.
When should I use snake_case vs kebab-case?
snake_case is common in Python, Ruby, Rust, and SQL β it uses underscores to separate words (e.g., my_variable_name). kebab-case uses hyphens and is standard in CSS properties, HTML attributes, and URL slugs (e.g., my-component-name). The choice depends on your language and framework conventions.
How does the tool detect word boundaries?
The converter detects word boundaries using three strategies: explicit delimiters (spaces, underscores, hyphens), camelCase transitions (lowercase-to-uppercase), and acronym boundaries (uppercase sequences followed by lowercase). This means inputs like "getHTTPResponse", "get_http_response", and "get-http-response" are all correctly split into the words: get, HTTP, response.
Does this tool handle acronyms correctly?
Yes. The converter preserves and detects acronyms. For example, "XMLParser" is split into "XML" and "Parser", so converting to snake_case produces "xml_parser" rather than "x_m_l_parser". Similarly, "getHTTPSUrl" correctly splits into "get", "HTTPS", and "Url".
Is my text sent to any server?
No. All case conversion happens entirely in your browser using client-side JavaScript. Your text never leaves your device, ensuring complete privacy for sensitive variable names or proprietary code.