Snake Case Converter

Paste camelCase, PascalCase or plain words and copy them as snake_case, kebab-case or CONSTANT_CASE.

A sample. Type or paste your own.

Sample snake_case 16 characters

total_page_count

The same text, 2 more ways

  • kebab-case 16 characters total-page-count
  • CONSTANT_CASE 16 characters TOTAL_PAGE_COUNT
More options language rules
Settings
Language rules

All 3 case styles

Words joined by a mark 3

  • CONSTANT_CASE Snake case with every letter a capital, also called screaming snake case: max retry count becomes MAX_RETRY_COUNT. PEP 8 writes constants this way. One letter grows on the way up: the German ß turns into SS.
  • kebab-case Small letters with one hyphen between words. An underscore or a space turns into a hyphen, so first_name becomes first-name and HTTPServer error becomes http-server-error.
  • snake_case HTTPServer error becomes http_server_error, a hyphen turns into an underscore, and a name that is already in snake_case comes back as it went in.
How this list was compiled

Own work. The 3 styles are the ones this page shows, with snake_case first. Every example in a note is kept with its style as a test pair and was produced by the converter this page runs on 2026-10-08; one went in only when the result matched. Snake case for the names of functions and variables, and capitals with underscores for constants with MAX_OVERFLOW as an example, follow PEP 8, the style guide for Python code, section Naming Conventions (https://peps.python.org/pep-0008/), read 2026-10-08. Pothole case and screaming snake case as other names, dash case, spinal case and Lisp case as names for kebab case, and kebab case in CSS property names follow the Wikipedia article on letter case (https://en.wikipedia.org/wiki/Letter_case, CC BY-SA 4.0), read 2026-10-08. Neither publisher is connected with this site. Licence: own work

How it works

This snake case converter rewrites your text as snake_case while you type: small letters, with an underscore wherever one word ends and the next begins.

Read the full guide

What marks the word breaks

An underscore in snake_case, a hyphen in kebab-case, and an underscore between capitals in CONSTANT_CASE: total_page_count, total-page-count, TOTAL_PAGE_COUNT.

Convert camel case to snake case

A capital after a small letter or a digit starts a new word, so camelCase and PascalCase names split alike: totalPageCount and TotalPageCount both become total_page_count. A run of capitals stays together up to its last one: HTTPServer becomes http_server and getURLForUser becomes get_url_for_user.

Where a digit splits

A number typed as its own word stays one: page 2 count becomes page_2_count. A digit joined to letters stays joined: utf8Decoder becomes utf8_decoder.

  • An apostrophe inside a word is dropped: user's name becomes users_name.
  • Each line converts by itself, so a pasted column of field names stays a column.
  • Accents are kept: café menu becomes café_menu.

Questions and answers

What is snake case?

Snake case writes a name in small letters with underscores where the spaces were: total_page_count. PEP 8, the style guide for Python code, asks for it in function and variable names. Another name for it is pothole case.

How do I convert a string to snake case?

Type or paste it. Spaces and punctuation between words turn into one underscore, capitals go small, and punctuation at either end is dropped: Final report (draft) becomes final_report_draft.

How do I convert camel case to kebab case?

Copy the kebab-case row. It finds the same words and joins them with hyphens: totalPageCount becomes total-page-count. Kebab case is also called dash case, spinal case or Lisp case, and CSS property names are written in it.

Can it convert snake case to camel case?

That is the camel case converter: paste total_page_count there and it reads totalPageCount, with TotalPageCount in the row under it.