ruxox
Start
Start
Text / Case

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 this tool

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.

Case styles

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.

StyleExampleUsed for
camelCaseuserAccountIdJS/Java variables, JSON keys
PascalCaseUserAccountIdClasses, components, types
snake_caseuser_account_idPython, Ruby, SQL columns
kebab-caseuser-account-idURLs, CSS classes, filenames
SCREAMING_SNAKEMAX_RETRY_COUNTConstants, environment variables
Title CaseUser Account IdHeadings 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.

FAQ

Frequently asked questions

What is the difference between camelCase and PascalCase?

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.

When should I use kebab-case?

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.

Should headings use Title Case or sentence case?

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.

How are acronyms handled when converting case?

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.

Why do case mismatches break things?

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.

Why does camelCase start with a lowercase letter but PascalCase starts uppercase?
camelCase (also called lower camelCase) is the naming convention for variables and functions in JavaScript, Java, and many other languages — the first word is lowercase, subsequent words are capitalised. PascalCase (upper CamelCase) capitalises every word including the first — it is used for class names, constructor functions, React components, and TypeScript types/interfaces because it visually signals "this is a type, not a value."
What does SCREAMING_SNAKE_CASE mean?
It is snake_case with all letters uppercase. It is universally used for constants and environment variables (e.g. 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.
Which case should I use for CSS custom properties?
Kebab-case is the convention: --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.
Custom software

Need consistent naming conventions enforced in your codebase?

ruxox builds custom software with code standards, linting, and consistent architecture baked in from the start.

Free project estimateNo obligation · reply in 48h
Get estimate