Snake Case Converter — Text to snake_case Online

Convert text to snake_case — the standard for Python variables, database columns, and file names. Free, instant, client-side snake case converter.

🔒 100% Client-Side Processing

Your data is processed entirely in your browser and never transmitted to any server.

Example

Input

getUserProfile

Output

get_user_profile

camelCase input is split on its capital boundaries, so you do not need to add spaces first. Acronym runs stay whole: parseHTTPResponse becomes parse_http_response.

0 / 100M Limit

Common Use Cases

Naming database columns

Convert display names or camelCase API fields into the snake_case identifiers that SQL tables, migrations and ORM models expect, without renaming each column by hand.

Writing Python to PEP 8

Turn a phrase or a JavaScript-style name into the snake_case that PEP 8 requires for Python functions, variables and module names, so linters stay quiet.

Defining environment variables

Convert config names into the underscore-separated form used in .env files and CI settings, then uppercase the result for the final SCREAMING_SNAKE_CASE form.

Mapping an API payload to a database

Translate a camelCase JSON response into the snake_case column names your insert statement needs, which is the usual chore when wiring a third-party API into storage.

Frequently Asked Questions

Where is snake_case the standard?
Python variables and functions under PEP 8, SQL table and column names, Ruby methods, and Rails database fields. Environment variables use the SCREAMING_SNAKE_CASE variant of the same convention. Many JavaScript APIs carry snake_case JSON on the wire but use camelCase objects in code, which is why converting between the two is such a common chore.
Does the converter handle camelCase input?
Yes. It detects the capital-letter boundaries in camelCase or PascalCase input and inserts underscores there, so getUserProfile becomes get_user_profile without you adding spaces first. Acronym runs stay together rather than exploding letter by letter, so parseHTTPResponse becomes parse_http_response and not parse_h_t_t_p_response.
Why do databases prefer snake_case over camelCase?
Because unquoted SQL identifiers are case-folded. PostgreSQL lowercases them, so a column created as userProfile is stored as userprofile, and every later reference needs double quotes to keep the capitals. Underscores survive folding untouched, so a snake_case name reads identically everywhere. For the JavaScript form use the Camel Case Converter; for URL slugs use the Kebab Case Converter.
What is SCREAMING_SNAKE_CASE and when should I use it?
It is the same convention uppercased, and it signals a constant rather than a variable. Use it for environment variables in .env files and CI settings, and for module-level constants in Python and JavaScript. Convert here first and then uppercase the result — the word splitting is identical, only the final casing differs.
How are accented characters handled?
Accented characters are folded to their closest ASCII form rather than dropped, so "Café Menu Items" becomes cafe_menu_items and the German ß expands to ss. That matters for database columns and file names, where a stray non-ASCII byte can break a migration, a shell script, or a client library that assumes plain ASCII identifiers.
Is my data private when I use this tool?
Yes. This tool runs entirely in your browser using client-side JavaScript — nothing you type is transmitted to, logged by, or stored on any server. You can safely process confidential text, tokens, or code.