snake_case is the lowercase underscored spelling used for Python names, database columns, and plenty of JSON that refuses camelCase. “Odd socks in the dryer.” becomes odd_socks_in_the_dryer. The period is dropped. “in” and “the” stay as words, joined with underscores rather than skipped.
Capitals inside a token are boundaries before the lowercasing. “XMLHttp request” becomes xml_http_request. Hyphens you already typed are boundaries too, so odd-socks is odd_socks. Apostrophes are removed. The result is letters, digits, accents, and underscores.
CONSTANT_CASE is the same words in capitals: ODD_SOCKS_IN_THE_DRYER. If a style guide wants the shout, that is the other page. snake_case will not uppercase a single letter. Accents are kept, so this is not a slug.
Odd socks in the dryer.
odd_socks_in_the_dryer Five words, four underscores, no period.
Oddsock runs this in your browser. It is free, it does not upload the work, and it does not ask for an account.
The words and the underscores match. snake_case is lowercase. CONSTANT_CASE is ODD_SOCKS_IN_THE_DRYER.
Punctuation is not a word. The identifier has no period and no trailing underscore.
xml_http_request. Internal capitals split the token, then every piece is lowercased.
No. odd_socks_in_the_dryer keeps in and the.
No. crème stays crème. Use the slug maker for an ASCII fold, and expect hyphens there rather than underscores.