snake_case Converter
snake_case joins lowercase words with underscores: user_first_name. Paste a sentence, a camelCase identifier, or a whole column of field names below and click snake_case.
Example
the quick brown fox jumps over the lazy dogthe_quick_brown_fox_jumps_over_the_lazy_dogWhere snake_case is standard
- Python — PEP 8 mandates snake_case for variables, functions, and module names.
- Ruby — methods and variables, by community convention.
- SQL databases — PostgreSQL folds unquoted identifiers to lowercase, which makes snake_case the path of least resistance for table and column names.
- Rust — functions, variables, and modules (types use PascalCase).
- JSON APIs written by Python or Ruby backends, and most YAML configuration keys.
camelCase to snake_case
The converter detects capital-letter boundaries, so existing identifiers split correctly without you adding spaces first. getUserID becomes get_user_id, and parseHTTPResponse becomes parse_http_response — consecutive capitals are treated as one acronym rather than one word per letter, which is the behaviour you want.
snake_case vs kebab-case
They are the same shape with a different separator, and the choice is dictated by context rather than taste. Underscores are valid in identifiers in nearly every programming language, so snake_case is the code convention. Hyphens are not valid in identifiers but are preferred in URLs and CSS, which is why kebab-case owns that territory. Use snake_case in code, kebab-case in anything a browser reads.