snake_case converter
Write lowercase words joined by underscores, the standard for Python variables and database column names.
Advertisement
0 characters, 0 words
0 characters, 0 words
Drop your text file to load it
Advertisement
About this tool
snake_case writes every word in lowercase and joins them with underscores. It stays easy to read and works in places where spaces are not allowed.
Python, Ruby and Rust use it for variables and functions, and it is popular for database columns and file names.
Example
Before
Convert This TextAfter
convert_this_textWhen to use it
- Python variables and function names
- Database tables and column names
- File names without spaces
- Converting camelCase or titles into code names
Advertisement
Questions
When should I use snake_case instead of camelCase?
Follow the convention of your language or project. Python and SQL usually prefer snake_case, JavaScript usually prefers camelCase.
What about CONSTANT_CASE?
That is snake_case in capitals, used for constants. Use the constant case converter for it.
Does it split existing camelCase words?
Yes. myVariableName becomes my_variable_name.
Other case converters
- UPPERCASE
- lowercase
- Title Case
- Sentence case
- camelCase
- PascalCase
- kebab-case
- CONSTANT_CASE
- tOGGLE cASE
- aLtErNaTiNg