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.