Code Case Converter

DEVELOPER NAMING STRINGS CODE
Share:

Code case converter — type a name or phrase and instantly see it in camelCase, PascalCase, snake_case, kebab-case, CONSTANT_CASE, dot.case, Title Case and Sentence case. Copy any form with one click. Runs in your browser.

RT-DEV-092 · Developer Tools

Code Case Converter

Advertisement
After tool · AD-W1Responsive

How to Use the Code Case Converter

Type a name

Enter a variable, label or phrase in any style.

See every case

All eight naming styles update instantly.

Pick the one you need

camelCase, snake_case, kebab-case and more.

Copy it

One click copies that form.

Advertisement
After how-to · AD-W2Responsive

One Name, Every Case

Programmers spend a surprising amount of time renaming things. A variable invented in camelCase needs to become a kebab-case CSS class, a label has to turn into a CONSTANT_CASE environment variable, a database column in snake_case wants a PascalCase model name. Doing those conversions by hand is fiddly and error-prone, especially once acronyms and existing separators get involved. This converter does them all at once: type a name or phrase in any style and it shows eight standard forms — camelCase, PascalCase, snake_case, kebab-case, CONSTANT_CASE, dot.case, Title Case and Sentence case — each with a one-click copy button.

The clever part is the word-splitting. To convert reliably, the tool first has to work out what the underlying words are, regardless of how the input is formatted. It detects boundaries from every common separator — spaces, underscores, hyphens and dots — and from the case transitions inside camelCase and PascalCase, including the tricky runs of capital letters that acronyms produce. The upshot is that “getHTTPResponse”, “get_http_response” and “Get HTTP Response” all reduce to the same three words before being reassembled into whichever case you want, so the conversions stay consistent no matter what you paste in.

Each case has its place, and knowing which to use is part of writing idiomatic code. camelCase is conventional for variables and functions in JavaScript and Java; PascalCase names classes, types and UI components; snake_case is the Python and SQL standard and is safe almost everywhere; kebab-case belongs in URLs, CSS class names and file names where hyphens are valid but would be read as a minus sign in code; and CONSTANT_CASE flags values that should never change, like constants and environment variables. Title and Sentence case are there for turning an identifier back into readable prose, or a heading into a slug. Most teams settle on a convention per language and let a linter enforce it, but the moment you move a name across contexts you need a quick, accurate conversion — and this tool provides it entirely in your browser, so nothing you type ever leaves your device.

The hard part of case conversion isn’t joining words — it’s splitting them, especially when acronyms and mixed separators are involved.

10 Facts About Naming Cases

01

camelCase is common for JS/Java variables.

02

PascalCase names classes and components.

03

snake_case dominates Python and SQL.

04

kebab-case is used in URLs and CSS classes.

05

CONSTANT_CASE marks constants and env vars.

06

Consistent naming improves readability.

07

Acronyms (HTML, ID) need careful boundary handling.

08

Linters often enforce a project’s case style.

09

kebab-case avoids issues with case-insensitive URLs.

10

This tool runs in your browser — nothing is uploaded.

Frequently Asked Questions

  • It produces eight forms from any input: camelCase, PascalCase, snake_case, kebab-case, CONSTANT_CASE, dot.case, Title Case and Sentence case. You type once and see every form at once, each with a one-click copy button, so you can grab whichever your language or style guide requires.
  • It detects word boundaries from any mix of separators — spaces, underscores, hyphens and dots — as well as the case transitions inside camelCase and PascalCase, including runs of capitals from acronyms. So “getHTTPResponse”, “get_http_response” and “Get HTTP Response” all break into the same underlying words before being recombined.
  • Both join words with no separators and capitalise each word, but camelCase leaves the first word lower-case (myVariableName) while PascalCase capitalises it too (MyVariableName). By convention camelCase is used for variables and functions in many languages, and PascalCase for classes, types and components.
  • snake_case (words joined by underscores) is the norm for variables and functions in Python and Ruby and for SQL identifiers, and it is safe in nearly all programming contexts. kebab-case (words joined by hyphens) is used where hyphens are valid — URLs, CSS class names, HTML attributes and many file names — but not for code identifiers, since a hyphen reads as a minus sign.
  • CONSTANT_CASE — also called SCREAMING_SNAKE_CASE — uses all capitals with underscores and conventionally marks values that do not change: constants, enum members and environment variables (like MAX_RETRIES or DATABASE_URL). The all-caps styling signals “do not reassign this” at a glance.
  • The converter treats a run of capital letters as a single word boundary, so “HTMLParser” splits into “html” and “parser”. This means acronyms are normalised consistently. If your project has a specific convention for acronyms in camelCase (such as “httpUrl” versus “httpURL”), review the output, as style guides differ on this fine point.
  • Because code is read far more often than it is written. A consistent case convention lets readers infer what a name represents — a class, a constant, a URL segment — without checking its definition, and it keeps a codebase looking coherent. Most teams pick a convention per language and enforce it with a linter; this tool helps you convert quickly when moving names between contexts.
  • Yes. Although it is aimed at identifiers, it works on any phrase, which is handy for generating a slug from a title (kebab-case), a constant name from a label (CONSTANT_CASE), or a readable heading from a variable (Title or Sentence case). Numbers are preserved as part of the words around them.
  • No. All the splitting and recombining happens in your browser. Nothing you type is transmitted, logged or stored, so it is safe to use with private code, identifiers or internal names.
  • Completely free, with no account or limit. It works offline once the page has loaded and collects no data.

Related News

You may be interested in these recent stories from our newsroom.

View all news →
Advertisement
Pre-footer · AD-W3 728 × 90

75 more free tools

Calculators, converters, security tools — no signup.