Case Converter
Convert identifiers between camelCase, snake_case, kebab-case, PascalCase, and more.
Client-Side Execution & Privacy Guarantee
This utility executes 100% locally in your web browser. Your inputs, tokens, queries, and data payloads are never transmitted to any external server or backend.
Programming languages and style guides disagree on how multi-word identifiers should be written. Moving a name from a JavaScript camelCase API into a Python snake_case module, or from a CSS kebab-case class into a PascalCase component, is a frequent source of small but annoying mistakes. This converter applies a deterministic set of rules so the transformation is consistent every time.
All work happens locally. You can paste a single identifier, a list of names, or even a short code fragment and receive the converted form immediately. The tool never transmits the text, making it safe for internal project names or partially written source.
Supported case styles
camelCase capitalizes each word after the first and removes separators. PascalCase capitalizes every word including the first. snake_case and kebab-case insert an underscore or hyphen and force lower case. CONSTANT_CASE uses underscores and upper case.
The converter also recognizes a space-separated or title-case input and can produce any of the above outputs. Acronyms such as HTML or API are kept together when they appear in the original; the tool does not attempt to split them further.
Word boundary detection
Boundaries are detected at transitions from lower to upper case, at existing separators (space, underscore, hyphen), and at runs of digits. This allows mixed input such as XMLHttpRequest or user_id_2 to be split correctly before reassembly.
Consecutive capitals are treated as a single acronym unless a lower-case letter follows, matching the most common programming convention. The result is then re-cased according to the target style.
Batch and partial conversion
When the input contains multiple lines or comma-separated tokens each token is converted independently. Surrounding punctuation and whitespace are left untouched so you can convert a column of names without manual cleanup.
If only a selection inside a larger string should change, convert the selection alone and paste it back. The tool does not rewrite entire source files; it is intentionally limited to identifier-level transformations.
When to use this tool
- Renaming a variable when moving code between language conventions
- Generating a set of CSS class names from a list of camelCase keys
- Preparing constant names for a configuration object
- Checking that a proposed identifier follows the project style guide
- Bulk-converting a short list of database column names
How to use the Case Converter
- Paste the identifier or list of identifiers into the input box.
- Select the source case if it is ambiguous, or leave detection on.
- Choose the target case from the style buttons.
- Review the converted result; each token appears on its own line if the input was multi-line.
- Copy the output and replace the original names in your editor.
- For a single word, the conversion is instantaneous as you type.
- Clear the field when finished.
Worked examples
camelCase to snake_case
userAccountId
user_account_id
Internal capitals mark word boundaries; everything is lower-cased and joined by underscores.
kebab-case to PascalCase
http-response-code
HttpResponseCode
Hyphens are removed and each segment is capitalized.
Common mistakes and tips
- Acronyms at the start of a camelCase name (XMLParser) stay together; verify the result if your style guide splits them.
- Leading or trailing separators are stripped so the output never begins or ends with _ or -.
- Digits stay attached to the preceding word unless a separator already isolates them.
- The converter is case-sensitive on input only for boundary detection; the output case is fully determined by the target style.
- Very long identifiers are handled without truncation.
Frequently asked questions
Does it handle Unicode letters?
Yes. Any character that is not ASCII is treated as part of a word and preserved.
Can I convert an entire source file?
No. The tool is designed for identifiers. Use a proper refactoring tool for whole-file renames.
What is the difference between snake_case and CONSTANT_CASE?
snake_case is lower-case with underscores; CONSTANT_CASE is upper-case with underscores.
Are spaces considered separators?
Yes. Space-separated words are split and then rejoined according to the target style.
Does the tool remember my last target style?
The selection persists for the current browser session.