Phrases or camelCase to CONSTANT_CASE for constants and env vars
snake_case Converter
Turn camelCase fields or spreadsheet headers into snake_case names that Python, Rust and SQL databases expect.
Loading tool…
How to use snake_case converter
Paste column headers, fields or phrases, one per line.
Leave ASCII only on so accents become plain letters (numéro becomes numero).
Turn on splitting digits if address2 should become address_2.
Copy the snake_case names or download them.
What this tool does
- Splits camelCase and acronyms correctly: HTTPResponseCode becomes http_response_code.
- Collapses repeated separators and trims them from the ends, so __foo--bar becomes foo_bar.
- Transliterates accents and special letters (ß to ss, ø to o) for database-safe names.
- Keeps one name per line for bulk renames.
How the result is verified
Each result is split on its underscores and compared with the words found in the input, which must be the same words in the same order. Empty results and names that start with a digit are reported.
Frequently asked questions
Why use snake_case for database columns?
PostgreSQL folds unquoted names to lowercase, so a column created as createdAt is stored as createdat unless you quote it everywhere. snake_case avoids the problem and stays readable.
Which languages use snake_case?
Python for variables and functions (PEP 8), Ruby for methods, Rust for variables and functions, and most SQL schemas. Constants in those languages use the capital form, CONSTANT_CASE.
Is my data uploaded to a server?
No. Everything you drop, paste or type is processed by code running in this browser tab. You can check it yourself: open your browser's developer tools, watch the Network panel, and use the tool. No request carries your data.
Related tools
Phrases or snake_case names to camelCase, acronym and digit aware
camelCase or phrases to kebab-case for CSS, files and URLs
Every case at once: upper, lower, title, sentence, camel, snake, kebab and more