Snake Case Converter
Convert any naming convention to snake_case, the Python, Ruby and SQL standard.
Everything you type here is processed on your own device. No input is sent to a server, logged, or stored.
What the Snake Case Converter does
Use this snake case converter to convert any naming convention to snake_case, the Python, Ruby and SQL standard. Paste your text in, pick the options you need, and copy the result straight back out. It is most often used for converting a JavaScript property name to a Python variable. For a second version of this snake case converter, see FreeToolStation.org.
How to use it
- Paste or type your text into the input box.
- The target case is already selected — change it from the dropdown if you need a different one.
- The converted text appears immediately as you type.
- Press Copy to put the result on your clipboard.
How it works
snake_case is lowercase words joined by underscores, and it is the convention for variables and functions in Python and Ruby, for column names in most SQL dialects, and for environment variables in their uppercase form.
It is measurably easier to read than camelCase for multi-word identifiers — the underscore gives the eye a real word boundary rather than relying on a case change. That advantage is why it survives in languages that could have gone either way.
SQL is a practical reason to care: most dialects fold unquoted identifiers to one case, so a camelCase column name either gets flattened or requires quoting everywhere it appears. snake_case sidesteps the problem entirely.
When to use it
- Converting a JavaScript property name to a Python variable.
- Generating SQL column names from field labels.
- Creating environment variable names.
- Normalising identifiers when porting between languages.
Common mistakes to avoid
- Using snake_case for class names, where PascalCase is conventional in both Python and Ruby.
- Leaving a leading underscore accidentally, which signals "private" in Python.
- Mixing conventions within one schema or module.
Frequently asked questions
What is snake_case?
Lowercase words joined by underscores: user_first_name. It is standard for variables in Python and Ruby and for column names in SQL.
Why use snake_case for SQL columns?
Because most SQL dialects fold unquoted identifiers to a single case, so camelCase names either get flattened or need quoting everywhere. snake_case avoids the issue.
What is SCREAMING_SNAKE_CASE?
snake_case in capitals, used for constants and environment variables. The constant case converter produces it.