Snake Case Converter

Convert to snake_case format.

Open tool

Overview

Convert any text into snake_case — all lowercase, words joined by underscores. It's the standard variable and function naming style in Python, Ruby, and Rust, and a common format for database column names across most SQL dialects.

Developers normalizing identifiers across languages, data engineers converting CSV headers to clean column names, and code generators producing source files all reach for it. The conversion handles camelCase, PascalCase, kebab-case, and free-form sentences as input.

How it works

The converter splits your input on word boundaries: whitespace, hyphens, dots, and case transitions (so userID becomes "user" + "ID"). It lowercases the result and joins the parts with a single underscore. Runs of multiple separators collapse to one underscore, and non-alphanumeric characters are stripped.

Examples

Input:  Hello World
Output: hello_world
Input:  userProfileImage
Output: user_profile_image
Input:  XMLHttpRequest
Output: xml_http_request
Input:  some-kebab-text
Output: some_kebab_text

FAQ

What's the difference between snake_case and SCREAMING_SNAKE_CASE?

Both use underscores. snake_case is all lowercase (max_retries), used for variables and functions. SCREAMING_SNAKE_CASE is all uppercase (MAX_RETRIES), used for constants and environment variables.

Is snake_case still used outside Python and Ruby?

Yes. Most SQL databases conventionally use snake_case for table and column names. JSON APIs are split between snake_case and camelCase; both styles are widely seen.

Does it preserve numbers?

Yes. Digits stay attached to whichever word they belong to: user_2_profile stays as written.

Try Snake Case Converter

An unhandled error has occurred. Reload ×