Online snake_case Converter

Convert words and phrases into lowercase snake_case identifiers separated by underscores.

snake_case Converter extracts word boundaries, lowercases all letters, and joins tokens with ASCII underscores (U+005F _). For example, User Account Registration Timestamp (4 words, 35 chars) becomes user_account_registration_timestamp (1 token, 35 chars).

Fixed:
0 Characters
0 Words
0 Sentences
🧹 Remove
🔤 Convert
📑 Format
Copied to clipboard

What Is snake_case and How Does It Format Identifiers?

snake_case is a programming identifier convention where all letters are lowercase and words are delimited by single ASCII underscores (_, U+005F).

snake_case is a naming convention where all words are lowercase and separated by underscores (_) with no spaces or punctuation (e.g., user_account_registration_timestamp).

What Regex & Tokenization Rule Does the snake_case Converter Use?

The converter splits input on non-alphanumeric delimiters (/[^\p{L}\p{N}]+/u) and lowercase-to-uppercase camelCase transitions (/(?<=\p{Ll})(?=\p{Lu})/u), then executes words.map(w => w.toLowerCase()).join("_").

  • Worked Before / After Example: Input User Account Registration Timestamp And Email (6 words, 45 characters) → Output user_account_registration_timestamp_and_email (1 identifier, 45 characters; 6 uppercase letters lowercased, 5 spaces replaced with _).
Input Format / Transformation Rule Input Example (Before) Output Result (After) Characters Changed (count)
Title Words → snake_case User Account Email (18 chars, 3 words) user_account_email (18 chars, 1 token) 3 letters lowercased, 2 spaces → _
camelCase → snake_case createdAtTimestamp (18 chars) created_at_timestamp (20 chars) +2 underscores inserted, 2 letters lowercased
PascalCase → snake_case DatabaseConnectionPool (22 chars) database_connection_pool (24 chars) +2 underscores inserted, 3 letters lowercased
kebab-case → snake_case oauth-refresh-token (19 chars) oauth_refresh_token (19 chars) 2 hyphens → 2 underscores

Where Is snake_case Used in Programming and Databases?

snake_case is the mandatory standard in Python (PEP 8), PostgreSQL/MySQL schema column names, Rust functions, and Ruby identifiers.

  • Python: Variable names, function names, and module files (PEP 8).
  • Relational Databases: SQL table names, column identifiers, and foreign keys.
  • Rust & Ruby: Standard identifier convention.
  • Configuration Files: YAML and JSON dictionary keys.

How to use this tool:

  1. Paste or type your text into the editor box above.
  2. Click the highlighted action button to run the transformation instantly on your device.
  3. Click Copy to place the cleaned text onto your clipboard.

More Free Online Text Tools

Cleaning & Stripping
Clean Pasted Text Remove Em Dash Remove Line Breaks Remove Invisible Chars Straighten Quotes Strip HTML Strip Markdown
Case Converters
All 11 Case Converters Sentence Case camelCase Converter snake_case Converter
Formatting & Analytics
Remove Duplicate Lines Alphabetize List Word & Character Counter

Clean text from any app with the Share Sheet.

Select text in Safari, Mail, or Notes and share it to Clean Text. The cleaned version is copied back to your clipboard with a summary of what was fixed.

  • Works inside Safari, Mail, Notes, Word, and Slack
  • Counts and audits damage: '2 em dashes, 3 invisible characters removed'
  • 100% on-device: zero network requests, zero telemetry, full privacy
  • Available on iPhone, iPad, and Mac
Text Cleaner: Case Converter App Screenshot