Snake Case Converter

Text Tools

How to use the Snake Case Converter

Convert to snake_case in three steps:

1

Paste your phrases

Enter one phrase per line in any format — camelCase, PascalCase, kebab-case, spaced words, or mixed.

2

Click Convert

Press 'Convert to snake_case'. All characters are lowercased and all word boundaries are replaced with underscores.

3

Copy or download

Copy the snake_case output to your clipboard or download as a .txt file.


When to use this tool

Use the snake_case converter for Python and database naming work:

  • Converting JavaScript camelCase variable names to Python snake_case equivalents
  • Generating database column names from human-readable field descriptions
  • Creating Python function, variable, and module names from plain descriptions
  • Converting file names to snake_case for consistent project directory structure
  • Transforming API response keys from camelCase to snake_case for Python consumption
  • Batch-converting a list of form field labels to snake_case for backend model fields

Frequently asked questions

Q:Does it correctly handle camelCase and PascalCase input?
Yes — the converter detects word boundaries inside camelCase and PascalCase strings by identifying where a lowercase letter is followed by an uppercase letter. 'getUserById' becomes 'get_user_by_id' and 'UserProfileSettings' becomes 'user_profile_settings' correctly.
Q:What separators are recognised in the input?
Spaces, hyphens (-), underscores (_), and forward slashes (/) are all treated as word separators. So 'hello-world', 'hello world', and 'hello/world' all become 'hello_world'.
Q:How are numbers handled in snake_case conversion?
Numbers attached to letters are kept with their word (e.g. 'address2Line' → 'address2_line'). Numbers surrounded by spaces are converted to their own segment (e.g. 'column 2 name' → 'column_2_name'). The converter preserves numbers without altering them.
Q:What is the difference between snake_case and kebab-case?
snake_case uses underscores as word separators (user_profile_name) and is the standard in Python, Ruby, and SQL database column naming. kebab-case uses hyphens (user-profile-name) and is standard for CSS class names, HTML attributes, and URL slugs. Use our Kebab Case Converter for the hyphen-separated variant.
Q:Can I convert multiple identifiers at once?
Yes — enter one phrase or identifier per line and the converter processes all lines simultaneously. This makes it easy to batch-convert an entire list of database fields, API response keys, or form input names in a single click.
Q:Which languages and systems use snake_case as their standard?
snake_case is the official convention for variables, functions, and modules in Python (per PEP 8), Ruby, Rust, and PHP. It is also the standard for SQL database column and table names, Linux/Unix file naming, and environment variable names (typically in SCREAMING_SNAKE_CASE like API_KEY).