AaCaseConvertly

snake_case Converter

Convert text and identifiers to snake_case — with developer-aware splitting, so XMLParser becomes xml_parser.

0 characters0 words0 lines0 sentences
snake_case
Your snake_case result will appear here…

All cases — live preview (click any result to copy it)

UPPERCASE
Start typing to see UPPERCASE…
lowercase
Start typing to see lowercase…
Title Case
Start typing to see Title Case…
Sentence case
Start typing to see Sentence case…
Capitalized Case
Start typing to see Capitalized Case…
aLtErNaTiNg CaSe
Start typing to see aLtErNaTiNg CaSe…
RaNdOm CaSe
Start typing to see RaNdOm CaSe…
iNVERSE cASE
Start typing to see iNVERSE cASE…
snake_case
Start typing to see snake_case…
camelCase
Start typing to see camelCase…
PascalCase
Start typing to see PascalCase…
kebab-case
Start typing to see kebab-case…
CONSTANT_CASE
Start typing to see CONSTANT_CASE…
Train-Case
Start typing to see Train-Case…
dot.case
Start typing to see dot.case…
slugify
Start typing to see slugify…

Private by design — every conversion runs locally in your browser. Your text is never uploaded, stored or tracked.

snake_case is a naming convention where words are written in lowercase and joined by underscores: user_profile, total_price, created_at. The name describes the long, low shape of the text. It is the standard for variables and functions in Python and Ruby, for database table and column names in SQL, and for file names in many data and science workflows.

A naive converter that only replaces spaces produces broken results from real identifiers — userID would become user_i_d. This converter first splits text the way a developer reads it, recognizing camelCase humps, acronym boundaries (XMLParser → xml_parser), hyphens and numbers, then joins the words with underscores.

When to use it

  • Naming variables and functions in Python and Ruby
  • Designing database tables and columns (users, order_items, created_at)
  • Converting camelCase or PascalCase identifiers from JavaScript or Java code
  • Naming files for data pipelines, where spaces and capitals cause bugs
  • Preparing column headers when exporting data to CSV or SQL

How it works

  1. The input is split into words by the identifier-aware splitter — camel humps, acronym boundaries, hyphens, spaces and numbers are all word edges.
  2. Every word is lowercased in full.
  3. The words are joined with single underscores; the output never starts, ends or doubles an underscore.
  4. Because the splitter is shared, converting back with the camelCase or kebab-case converter restores the same word boundaries.

Examples

Input
userID
Output
user_id
Input
XMLParser
Output
xml_parser

The acronym XML stays together as one word.

Input
total price in USD
Output
total_price_in_usd

Plain phrases work too — capitals are simply lowered.

Good to know

snake_case is the convention of the data world. Python's PEP 8 made it the official style for functions and variables, SQL has used it for tables and columns since before most current developers were born, and file names in data pipelines follow it because underscores survive every filesystem, shell and URL without escaping. Its readability advantage is real at a glance: word boundaries are explicit characters, not capital letters your eye has to catch, which is why long descriptive names — the kind databases and data columns have — are usually snake_case.

Its mirror-image weakness is length and typing cost: the same name is longer than its camelCase form and needs the underscore key for every boundary. That trade is why ecosystems pick sides rather than mixing: a Python or Ruby codebase is snake_case throughout, a JavaScript codebase camelCase throughout, and converters like this one exist for the borders — APIs, database schemas, CSV headers and JSON payloads — where the two worlds have to exchange names without mangling them.

Frequently asked questions

What is the difference between snake_case and kebab-case?

The separator and the habitat. snake_case joins words with underscores and lives in code and databases; kebab-case joins words with hyphens and lives in URLs and CSS. Hyphens are not allowed in most programming identifiers, which is why code uses underscores.

Why is it called snake_case?

Because the text runs low and long along the ground, like a snake — the underscores sit on the baseline between lowercase words. The name was popularized by Python and Ruby communities, where the style is the official convention (PEP 8 recommends it).

Does it work on text that is already camelCase or PascalCase?

Yes. The splitter understands existing capitalization, so userProfilePage becomes user_profile_page and XMLHttpRequest becomes xml_http_request, without stray single letters.

Is my text uploaded or stored?

No. The conversion runs entirely in your browser. Nothing you type is sent to a server, stored or logged — safe for proprietary code and schemas.

What is SCREAMING_SNAKE_CASE?

The uppercase form of snake_case — words in capitals joined by underscores, like MAX_RETRY_COUNT. It is used for constants and environment variables, and this site has a dedicated CONSTANT_CASE converter for it.

Does the converter remove leading numbers or handle them specially?

Numbers are kept and treated as their own word segment: “version 2 update” becomes version_2_update. Note that many programming languages forbid identifiers that begin with a digit, so a result starting with a number may still need a prefix in code.

Related tools