● Developer Tools

Snake Case Converter: Turn Any Text into snake_case Online

Type or paste a phrase, sentence, or camelCase variable name below and it converts to snake_case instantly β€” with one-click switches to SCREAMING_SNAKE_CASE, camelCase, PascalCase and kebab-case.

Your text or variable name
Words detected
Input characters
Output characters
Underscores added

Every feature, at a glance

Everything this snake case converter does, in one place.

_

Real-time snake_case conversion

Converts your text to snake_case instantly as you type or paste β€” no button to click.

A_B

SCREAMING_SNAKE_CASE mode

One-click switch to all-caps underscore case for constants and environment variables.

aB

camelCase & PascalCase

Also converts to camelCase and PascalCase for languages that prefer those conventions.

-

kebab-case

One-click switch to hyphen-separated kebab-case for URL slugs and CSS class names.

πŸ”

Smart word-boundary detection

Automatically splits camelCase and PascalCase input like "firstName" into separate words.

βœ‚

Cleans up messy input

Strips extra spaces, hyphens and underscores so mixed formatting still converts cleanly.

#

Numbers preserved

Digits within words are kept in place and treated as part of the surrounding word.

W

Live conversion stats

See word count, input/output character counts, and underscores added as you type.

⧉

Copy & download

Copy the converted text to your clipboard or download it as a plain .txt file in one click.

πŸ”’

100% private

All conversion happens locally in your browser. Nothing you type is ever uploaded or stored.

∞

Free & unlimited

No signup, no paywall, no daily limit β€” use it as many times as you like.

β–’

Works on any device

Fully responsive layout that works the same on phone, tablet and desktop.

What is snake_case, and what is this converter for?

Snake case is a naming convention where every word in a phrase is lowercased and joined together with underscores β€” turning "First Name" or "firstName" into first_name. This tool converts any input β€” plain sentences, hyphenated phrases, or camelCase/PascalCase variable names β€” into snake_case instantly, entirely as JavaScript inside your browser. There's no upload and no server round-trip, so your code or data never leaves your device.

How word boundaries are detected

The converter splits your input wherever a new word logically begins: at spaces, hyphens, underscores, and at the transition from a lowercase letter to an uppercase letter (as in "firstName" β†’ "first" + "Name"). It also handles consecutive capitals correctly, so "UserID" becomes user_id rather than user_i_d. Detected words are then rejoined using the rules of whichever case style you select.

snake_case vs. SCREAMING_SNAKE_CASE

snake_case uses lowercase letters and is the standard for variable and function names in Python, Ruby and Rust. SCREAMING_SNAKE_CASE (also called CONSTANT_CASE) uses uppercase letters and underscores, and is the near-universal convention for constants and environment variables across almost every language, including MAX_RETRY_COUNT or DATABASE_URL.

Where snake_case is used

  • Python, Ruby & Rust β€” the official style guide convention for variable and function names.
  • Database columns β€” most SQL databases use snake_case for table and column names.
  • Environment variables β€” typically written in SCREAMING_SNAKE_CASE, like API_SECRET_KEY.
  • File & directory names β€” many command-line tools and static site generators prefer snake_case file names.
  • Configuration keys β€” YAML and JSON config files commonly use snake_case for readability.

Naming convention comparison

Case styleExampleCommon use
snake_casefirst_namePython/Ruby/Rust variables, DB columns
SCREAMING_SNAKE_CASEFIRST_NAMEConstants, environment variables
camelCasefirstNameJavaScript/Java variables & functions
PascalCaseFirstNameClass names, C#/Java types, React components
kebab-casefirst-nameURL slugs, HTML attributes, CSS classes

Frequently asked questions

Related tools