Case Converter
Understand Case Converter
This converter rewrites a name between the casing styles that different languages and tools expect — camelCase, PascalCase, snake_case, kebab-case, and their variants.
How it works
The input is split into words before anything is rebuilt. Separators split it — spaces, underscores, hyphens, dots, slashes — and so do case changes: a lowercase letter followed by an uppercase one, and a run of capitals followed by a capital-then-lowercase. That is how parseHTMLContent splits into parse, html, and content. The words are then lowercased and rejoined with the target style's separator and capitalization.
When to use it
- Renaming a set of API fields from snake_case to camelCase for a TypeScript client.
- Turning a page title into a kebab-case URL slug.
- Converting column names into CONSTANT_CASE for an enum or a set of environment variables.
- Matching an existing codebase's convention when you paste in code written under another one.
Watch out for
- Acronyms lose their casing. parseHTMLContent becomes parse_html_content, and converting that back gives parseHtmlContent — the round trip is not lossless, so check names containing HTML, API, ID, or URL by hand.
- UPPERCASE and lowercase are literal case changes applied to the original text rather than a re-split, so they keep whatever separators were already there.
- A digit does not create a word boundary, so v2Model is treated as the single word v2model rather than v2 plus Model.
Frequently Asked Questions
What is the most common case convention for each language?
JavaScript/TypeScript: camelCase for variables, PascalCase for classes. Python: snake_case for variables/functions, PascalCase for classes. URLs/CSS: kebab-case. SQL/constants: UPPER_SNAKE_CASE. Go: PascalCase for exports, camelCase for unexported.
How does the converter handle abbreviations like "HTML" or "API"?
Abbreviations are preserved in context. "parseHTMLContent" converts to parse_html_content (snake) and parse-html-content (kebab). To preserve abbreviation casing, separate them manually first.
What is SCREAMING_SNAKE_CASE?
SCREAMING_SNAKE_CASE (or CONSTANT_CASE or UPPER_SNAKE_CASE) is all-caps with underscores, used for constants and environment variables: DATABASE_HOST, MAX_RETRY_COUNT. It visually signals the value should not change at runtime.
How to Use Case Converter
- Paste or type your input in the input area above.
- The tool processes your input automatically or click Run.
- Copy or download the result using the action buttons.
- Use Ctrl+Enter to run quickly from the keyboard.