Snake Case
Snake case joins lowercase words with underscores (e.g., user_name); it is common in Python, database column names, and JSON.
Purpose
Provides a readable multi-word identifier naming style suited to case-insensitive environments.
Mechanism
Lowercase the words and join them with underscores. For example, "UserName" → "user_name". Common for Python, Ruby, SQL, and C function names. Similar to kebab-case (hyphens) but with underscores.
Use cases
- Python variable and function names
- Database column names
- JSON key names
- C/Rust function names
Examples
- Input
UserNameOutputuser_nameJoined with underscores
Common errors
- Mixing with kebab-case causes inconsistent style
- Standardize the naming style across the project
Related terms
Related tools
Case Converter
Convert text between upper, lower, title, camel, pascal, snake, kebab, constant, and sentence cases. Free, private, and 100% client-side. TOOL
Naming Convention Converter
Convert between camelCase, PascalCase, snake_case, kebab-case, CONSTANT_CASE. Free, private, 100% client-side. TOOL