Use the free Code Case Converter below: your data never leaves your browser — all work happens on your device, and nothing is uploaded to any server.
What code cases are
Programmers write the same name in different styles depending on the language and the context: camelCase for variables in JavaScript, PascalCase for classes and components, snake_case for Python variables and database columns, and kebab-case for CSS classes, URLs and file names. The words are identical; only the separators and capitalization change. Getting the conversion right by hand is slow and error-prone, especially for long names, which is why a converter that produces all four at once saves real time.
This tool takes any input — a phrase with spaces, an existing identifier in any case, or a title — splits it into words, and rebuilds it in all four cases. Type “user account settings” or paste “userAccountSettings” and you get back all four versions, ready to copy into your code. The conversion follows the standard rules each style guide expects, so the output is safe to paste directly.
How the word splitting works
Splitting sounds easy until you meet real code. The tool first breaks camelCase humps, so “userAccount” becomes “user” and “account”, and it handles acronyms, so “HTTPResponse” becomes “HTTP” and “Response” rather than a mess of single letters. Then it splits on anything that is not a letter or digit — spaces, hyphens, underscores, dots — and lowercases every word. From that clean word list, each case is rebuilt mechanically: camelCase lowercases the first word and capitalizes the rest, PascalCase capitalizes all of them, snake_case joins them with underscores, and kebab-case joins them with hyphens.
Numbers are kept with the word they belong to, so “level2 boss” converts cleanly, and empty input or input with no letters at all produces a friendly message instead of a crash. Everything runs in your browser, so your identifiers — which sometimes reveal what a project does — never leave your device.
When to use each case
camelCase is the default for variables and functions in JavaScript, Java and many C-style languages: “userAccountSettings”. PascalCase, also called UpperCamelCase, is for classes, components and types: “UserAccountSettings”. snake_case rules Python, Ruby and databases, where column and variable names look like “user_account_settings”. kebab-case belongs to URLs, CSS classes and HTML attributes: “user-account-settings”. Using the wrong case will not always break your code, but it will break your team’s style guide and make code reviews slower.
The converter shines when you move between layers of one project: a database column in snake_case, a Python variable in snake_case, a JavaScript variable in camelCase, a React component in PascalCase, and a CSS class in kebab-case, all for the same concept. Convert once, copy four times, and every layer agrees. It is also handy for renaming: paste the old name, get the new name in the target case, and search-and-replace with confidence.
Tips for clean conversions
Feed the tool clean input and you get clean output. If your phrase contains abbreviations, write them consistently — “HTTP response” converts to “httpResponse”, which is the standard treatment, but “Http response” gives the same result, so either is fine. Avoid mixing separators in one input, like “user-account_settings”, because the splitter treats every separator the same and the result may surprise you. And always read the output once before pasting: automated conversion is reliable, but a word like “iOS” or “eBay” has brand capitalization that no converter can guess.
For bulk renames, convert one representative name first and check all four outputs against your style guide, then run the rest. If your project uses an extra style — SCREAMING_SNAKE_CASE for constants, for example — take the snake_case output and uppercase it; that is the standard derivation, and it keeps your constants consistent with your variables.
Case conversion and naming well
A converter fixes formatting, but good names still need good words. Short, concrete names beat clever ones: “userAccountSettings” is better than “uas” or “theThing”. Convert the case, but also ask whether the words themselves say what the thing is and what it does. The best code reads like plain language in the right case — and this tool makes the case part automatic, so you can spend your attention on the words, which is the part no tool can do for you.
