Case Converter
Convert text between camelCase, snake_case, PascalCase, kebab-case, SCREAMING_SNAKE, and more. Runs in your browser with no server calls.
Case Converter
Runs entirely in your browser — no server calls, no tracking.
Enter text and click Convert.
🔒 Your data never leaves this tab. This tool has no backend.
About the Case Converter
Naming conventions differ across languages, frameworks, and contexts. JavaScript variables and functions use camelCase; Python variables and functions use snake_case; class names in both use PascalCase; CSS custom properties and HTML data attributes use kebab-case; environment variables and SQL column names often use SCREAMING_SNAKE. This tool converts between all of them from a single input.
Quick reference
camelCase — JS variables, JSON keys, API parameters: getUserById. PascalCase — class names, React components, TypeScript types: GetUserById. snake_case — Python functions, Ruby methods, SQL columns: get_user_by_id. kebab-case — CSS properties, HTML attributes, URL slugs, Kubernetes resource names: get-user-by-id. SCREAMING_SNAKE — environment variables, constants: GET_USER_BY_ID.
Converting from code identifiers
The converter handles mixed input: it splits on spaces, hyphens, underscores, and camelCase boundaries. So getUserById, get-user-by-id, get_user_by_id, and Get User By Id all produce the same word list and can be converted to any format. This makes it useful for renaming identifiers during a refactor or when translating a spec between teams.
Naming conventions and when each is used
Case conversion looks trivial until you need the right convention for a specific context — and most codebases enforce several at once.
| Style | Example | Used for |
|---|---|---|
| camelCase | userAccountId | JS/Java variables, JSON keys |
| PascalCase | UserAccountId | Classes, components, types |
| snake_case | user_account_id | Python, Ruby, SQL columns |
| kebab-case | user-account-id | URLs, CSS classes, filenames |
| SCREAMING_SNAKE | MAX_RETRY_COUNT | Constants, environment variables |
| Title Case | User Account Id | Headings and labels |
Sentence case and Title Case
UK style guides increasingly prefer sentence case for headings — only the first word and proper nouns capitalised — because it reads faster and handles brand names more gracefully. Title Case capitalises principal words but leaves short conjunctions, articles and prepositions lower case, which is why naive “capitalise every word” conversion looks wrong.
What trips converters up
Acronyms are the classic problem: parseHTTPResponse should become parse_http_response, not parse_h_t_t_p_response. Numbers create ambiguity too — is address2 one token or two? Accented characters must keep their marks when case changes, and Turkish dotted and dotless i behave differently from every other Latin alphabet.
Why it matters beyond tidiness
Case mismatches cause real failures: JSON keys that silently do not bind, environment variables that resolve as empty, CSS classes that never match, and URLs that 404 on case-sensitive servers while working locally on a case-insensitive filesystem.
Frequently asked questions
Both join words without separators; the difference is the first letter. camelCase starts lower case (userAccountId) and is used for variables, functions and JSON keys. PascalCase starts upper case (UserAccountId) and is used for classes, components and type names.
For anything that appears in a URL, a CSS class or a filename. Hyphens are safe in URLs, readable to search engines as word separators, and valid in CSS identifiers where underscores are conventionally avoided. Use snake_case for Python and SQL instead.
UK style guides increasingly favour sentence case — capitalise only the first word and proper nouns. It reads faster, handles brand names more gracefully, and avoids arguments about which short words to capitalise. Title Case remains common in US publishing and in product names.
Carefully — this is where most converters fail. parseHTTPResponse should become parse_http_response, not parse_h_t_t_p_response. This tool treats consecutive capitals as a single token, so acronyms survive conversion intact.
Because many systems are case-sensitive and fail silently. A JSON key with the wrong case simply does not bind, an environment variable resolves as empty, a CSS class never matches, and a URL that works on a case-insensitive Mac filesystem returns 404 on a Linux server.
DATABASE_URL, MAX_RETRIES) because the visual distinction from lowercase snake_case clearly signals "this value does not change at runtime." If you see an all-caps identifier in code, it is almost certainly a constant or environment variable.--primary-color, --font-size-lg, --spacing-f-3-4. This matches HTML attribute naming (data-user-id, aria-label) and the CSS property naming convention (background-color, border-radius). Avoid camelCase in CSS — it is technically valid but breaks consistency with the language's native conventions.Need consistent naming conventions enforced in your codebase?
ruxox builds custom software with code standards, linting, and consistent architecture baked in from the start.