What is snake_case?
snake_case joins words in lowercase and separates them with underscores, like first_name or total_count. It is widely used for variables and functions in Python and Ruby, and for database column names in SQL. This tool converts any text to snake_case instantly in your browser.
How to use
- Type or paste your text in the box above.
- It is converted to snake_case instantly as you type.
- Copy the result with one click.
Examples
| Input | snake_case |
|---|---|
First Name | first_name |
totalOrderCount | total_order_count |
user-id | user_id |
HTML Parser | html_parser |
Common uses
- Python and Ruby variable and function names.
- SQL database column names.
- Config keys and environment-style identifiers.
Frequently asked questions
What is the difference from kebab-case?
snake_case uses underscores (first_name); kebab-case uses hyphens (first-name).
Does it lowercase the text?
Yes. snake_case is lowercase with underscores between words.
What about CONSTANT_CASE?
That is uppercase snake_case (FIRST_NAME), used for constants.