What snake_case does
snake_case separates words with underscores and writes every letter in lower case. "User Login Count" becomes "user_login_count". Hyphens and spaces become underscores. camelCase and PascalCase are split before the underscores are added, so "userLoginCount" becomes "user_login_count".
Python variables, many database columns, and a lot of file names use this pattern. Ruby and PHP use it widely too.
Before and after
| Input | snake_case |
|---|---|
| Last Login At | last_login_at |
| user-login-count | user_login_count |
| getHttpResponse | get_http_response |
Environment variables are the same shape in upper case: LAST_LOGIN_AT. Make snake_case first, then open UPPER CASE and convert the result. Doing it in that order keeps the underscores.
If the destination is a URL or a CSS class, you usually want hyphens instead. That format is kebab-case. If the destination is a JavaScript variable, use camelCase.
Other formats
Questions
Is the text uploaded?
No. Conversion happens in this browser. The text is not sent to a ToolsNowPro server.
Does the result cost anything?
No. You can copy or download it without an account.
Will proper names stay capitalized?
Only if the format you chose keeps them. Sentence case lowercases the sentence first, so check names afterward.
When should I use snake_case?
Turn a phrase into snake_case with underscores. Use it for Python names, database columns, and file names, then uppercase it for environment variables.
Need a count instead of a new case? Use the word counter. Need placeholder copy while you design? Use the lorem ipsum generator.