TC

snake_case Converter

Turn text, camelCase or PascalCase into snake_case names. Ideal for Python variables, database columns and file names.

Characters: 0
Words: 0
Lines: 0
Reading time: 0 min

Keyboard shortcuts: Ctrl/⌘+B to copy • Ctrl/⌘+S to download • Ctrl/⌘+Backspace to clear

What is snake_case?

In snake_case, all letters are lowercase and words are separated by underscores. It is easy to read and safe in almost every system, which is why it is popular for code and data.

Example

Before

First Name
userEmailAddress
Order Total (EUR)

After

first_name
user_email_address
order_total_eur

When to use snake_case

It is the standard for variables and functions in Python and Ruby, for column names in SQL databases, and for many configuration keys and file names. For constants, many languages use the uppercase version (SCREAMING_SNAKE_CASE): convert to snake_case, then to UPPERCASE.

How to convert text to snake_case

  1. 1

    Paste or type your text in the box above. Pasted text is converted to snake_case automatically.

  2. 2

    Need another format? Click any button to switch, as many times as you like.

  3. 3

    Copy the result with the Copy button (Ctrl/⌘+B) or download it as a .txt file (Ctrl/⌘+S).

Frequently Asked Questions

Paste your camelCase names here: every capital letter starts a new word, so userEmailAddress becomes user_email_address.

Click snake_case, then click UPPER CASE. The underscores are kept.

Yes. Punctuation, symbols and accents are removed and replaced by a single underscore between words.