getwordcount.com

snake_case Converter

Convert text to snake_case with underscores.

Copied to clipboard

This snake_case converter lowercases your text and joins the words with underscores — turning User First Name into user_first_name. It is the naming style favoured in Python, Ruby, database columns and file names.

How to use the snake_case converter

  1. Paste a phrase, or an identifier in another case.
  2. The snake_case version appears instantly.
  3. Copy it into your code, database schema or file name.

What is snake_case?

snake_case writes words in lowercase separated by underscores, like user_first_name. Because it contains no spaces or capitals, it works safely as an identifier everywhere. It is the standard for variables and functions in Python and Ruby (PEP 8 recommends it), and a common choice for SQL column names and lowercase file names.

Examples

Inputsnake_case
User First Nameuser_first_name
totalItemCounttotal_item_count
background-colorbackground_color

Frequently asked questions

What is SCREAMING_SNAKE_CASE?

That is the all-uppercase version used for constants. Use the CONSTANT_CASE converter to produce it.

Does it convert camelCase to snake_case?

Yes. Paste a camelCase or PascalCase identifier and it will be split into lowercase words joined by underscores.

Where is snake_case used?

For variables and functions in Python and Ruby, for many SQL database columns, and for lowercase file names.

Related tools