Case Converter
Paste any text and get all nine common casings at once — UPPERCASE, lowercase, Title Case, Sentence case, camelCase, PascalCase, snake_case, kebab-case and CONSTANT_CASE. Click a result to copy it.
What Is a Case Converter?
A case converter rewrites a piece of text in a different letter casing convention. That sounds trivial until you need the same phrase in five forms at once: a database column wants user_profile_settings, the REST API it feeds wants userProfileSettings, the CSS class wants user-profile-settings, the env variable wants USER_PROFILE_SETTINGS, and the page heading wants "User Profile Settings". Doing that by hand is where typos and copy-paste bugs come from.
The Nine Casings and Where Each One Belongs
- camelCase — JavaScript and TypeScript variables, JSON keys, Java methods, API field names.
- PascalCase — class and type names in JS/TypeScript, C#, Java, Go exported identifiers, React components.
- snake_case — Python and Ruby variables and functions, PostgreSQL/SQL column names, Rust locals.
- kebab-case — CSS class names, HTML attributes, URL slugs, npm package names, custom elements in the DOM.
- CONSTANT_CASE — environment variables, Go constants, C/C++ macros, feature-flag keys.
- Title Case / Sentence case — page headings, email subject lines, UI button and menu labels.
Why Naive Conversion Breaks
Every case converter has to decide where one word ends and the next begins, and English does not make that easy. Notes like "iPhone" and "McDonald's" are already cased in a way no rule reproduces; acronyms are worse, since parse_HTTP_response could legitimately become parseHttpResponse or parseHTTPResponse. The pragmatic rule most codebases settle on is: acronyms become regular words in camelCase/PascalCase (parseHttpResponse, HttpClient) and stay whole in CONSTANT_CASE. Tools above collapse runs of separators (_, -, multiple spaces) into a single word boundary, so pasting a snake_case identifier and asking for kebab-case gives exactly what you expect.
Pro Tips
- Convert identifiers straight from code. Paste
getUserProfileByIdand you getget_user_profile_by_id— faster and less error-prone than retyping, and it avoids the classic mismatched-pair bug where a JSON key drifts from its database column. - Keep one canonical spelling. Whatever casing you pick, apply it everywhere: a field named
user_idin Postgres,userIdin JSON andUSER_IDin the env file is fine —user_Idsomewhere in the middle is not. - Locale-aware casing exists for a reason. In Turkish,
'i'.toLocaleUpperCase('tr')isİ(dotted capital I), while the plaintoUpperCase()givesI. JavaScript'stoUpperCase()is locale-independent, so it will not surprise you here — but server code that lowercases user input per locale can, and lowercase-then-compare checks on tags likeINFOhave caused real auth bugs.
FAQ
- Q: Is my text sent to a server?
- No. The conversion runs entirely in your browser with JavaScript, so it is safe for private copy, unpublished product names and internal identifiers.
- Q: How does it know where words start in an identifier?
- It splits on three signals at once: separators (
_,-, spaces), lowercase-to-uppercase transitions (userProfile→ user | profile), and acronym-to-word transitions (HTTPClient→ HTTP | Client). That is whygetUserProfileById,get_user_profile_by_idandget-user-profile-by-idall produce the same nine outputs. - Q: Why does "iPhone" or "McDonald" come out wrong in Title Case?
- Because Title Case only has a rule for the first letter of each word, and those names carry meaning in their internal capitals — it produces
IphoneandMcdonald. Run the conversion, then fix the handful of proper nouns by hand; a keep-list of brand names is the usual production fix. - Q: Why do Title Case rules differ between style guides?
- Because guides disagree about minor words. AP and Chicago capitalise everything except articles, coordinating conjunctions and short prepositions, so "How to Format Dates in Python" and "How to Format Dates In Python" are both defensible. This tool capitalises every word — the predictable choice for headings and UI labels — so lowercase to, in and of yourself if your style guide requires it.
- Q: Should my API use camelCase or snake_case?
- Pick one and never mix them in the same payload. JSON APIs built in JavaScript ecosystems usually use camelCase, Python and Ruby backends usually use snake_case, and both are correct — consistency matters far more than the choice, because a mixed payload (
userIdnext tocreated_at) forces every client to special-case field names. - Q: Can I convert a whole file or a list of identifiers?
- One paste at a time here — but you can convert a full column name list in one go, then run the outputs through the Diff Checker against the old list to confirm nothing but casing changed. For scripted bulk renames,
sedor a small Pythonre.subthat mirrors the same three split rules is the right tool.
Why Use Our Case Converter?
Nine casings at once, no signup, no uploads, no clicking through one conversion at a time. Every result updates as you type and copies to your clipboard with a single click, so moving an identifier from a database column to a JSON key to an env variable takes seconds instead of retyping.