Case Converter
Convert text between camelCase, snake_case, PascalCase, kebab-case, and more — runs entirely in your browser.
Naming case types explained
- camelCase — words joined with first letter of each word capitalized, except the first word. Standard in JavaScript variables, Java, C#, Go.
- PascalCase — same as camelCase but the first word is also capitalized. Standard for class names across most languages.
- snake_case — words separated by underscores, all lowercase. Standard in Python variables/functions, Ruby, SQL column names.
- SCREAMING_SNAKE_CASE — snake_case in all caps. Used for constants and environment variables.
- kebab-case — words separated by hyphens, all lowercase. Standard for CSS class names, HTML attributes, URL slugs, and CLI flags.
- Title Case — first letter of each word capitalized. Used in headings, book titles, and article titles.
- Train-Case — first letter of each word capitalized, joined with hyphens. Used in HTTP header names (e.g.
Content-Type,X-Request-Id).
Which case to use when
Follow the conventions of your language or ecosystem — don't mix cases in the same context:
- JavaScript / TypeScript:
camelCasefor variables and functions,PascalCasefor classes and React components. - Python:
snake_casefor variables and functions (PEP 8),PascalCasefor classes,SCREAMING_SNAKE_CASEfor module-level constants. - CSS:
kebab-casefor class names and custom property names (--my-color). - SQL:
snake_casefor table and column names. SCREAMING_SNAKE for SQL keywords (stylistic, not required). - URLs:
kebab-case. Google recommends hyphens over underscores for separating words in URLs. - Environment variables:
SCREAMING_SNAKE_CASEby universal convention.
Developer Guides
-
camelCase vs snake_case: Which Should You Use?
An honest comparison of camelCase and snake_case: how they work, which languages prefer which, and when to pick one over the other.
-
camelCase to snake_case in Python: Four Approaches
Convert camelCase strings to snake_case in Python using regex, str.join, or libraries. Includes code you can paste directly.
-
camelCase to snake_case in JavaScript: Three Clean Solutions
Convert camelCase identifiers to snake_case in JavaScript using regex, reduce, or a utility library. Includes edge-case handling for abbreviations.