Skip to content
OddsockLocal
Local
Source text
lowercaseodd socks in the dryer
UPPERCASEODD SOCKS IN THE DRYER
Title CaseOdd Socks In The Dryer
Sentence caseOdd socks in the dryer
camelCaseoddSocksInTheDryer
PascalCaseOddSocksInTheDryer
snake_caseodd_socks_in_the_dryer
SCREAMING_SNAKEODD_SOCKS_IN_THE_DRYER
kebab-caseodd-socks-in-the-dryer
Train-CaseOdd-Socks-In-The-Dryer
dot.caseodd.socks.in.the.dryer
path/caseodd/socks/in/the/dryer
aLtErNaTiNgOdD SoCkS In tHe dRyEr
iNVERSEODD SOCKS IN THE DRYER
5 wordsRuns in this browser. Nothing is uploaded.

How to use

  1. Paste the phrase.
  2. Leave Case on screaming snake.
  3. Copy the constant. It is safe to drop into a source file as a name, not as a sentence.
  4. Use uppercase instead if you needed the original spaces and the period.

What is CONSTANT_CASE converter?

Constants in code are shouted words joined by underscores. “Odd socks in the dryer.” becomes ODD_SOCKS_IN_THE_DRYER. The period is gone. The spaces are gone. Each word is uppercase, and the underscore is the only separator.

Read more

The split is the same one camelCase uses. “XMLHttp request” becomes XML_HTTP_REQUEST, because the capital boundary inside XMLHttp is a word boundary before the letters are uppercased. Hyphens and existing underscores also split words. An apostrophe is removed, so it does not survive as a character between letters.

Uppercase alone would have produced “ODD SOCKS IN THE DRYER.” with spaces and a period. That is a different page. CONSTANT_CASE is for an identifier, not for a headline. Accents stay attached to their letters. They are not transliterated.

Use cases

  • A developer naming an environment-style constant from a feature title.
  • A config author turning “max retry count” into MAX_RETRY_COUNT.
  • Someone checking that a sentence period did not land in the identifier.
  • A programmer splitting an XMLHttp-style token into underscored capitals.
  • A reviewer comparing the result with plain uppercase, which would have kept the spaces.

Five words into one constant

Odd socks in the dryer.

ODD_SOCKS_IN_THE_DRYER No period, no spaces. “in” and “the” are full words in the name.

Why use Oddsock

Oddsock runs this in your browser. It is free, it does not upload the work, and it does not ask for an account.

Related tools

Using this tool

The period is not a word, so it is dropped when the words are joined. ODD_SOCKS_IN_THE_DRYER is five words.