snake_case Converter for Code and Database Names

Paste plain text, camelCase or kebab-case below and click snake_case. Words become lowercase and are joined with underscores. Each line is converted separately, which makes it easy to rename a list of columns at once.

0 characters0 without spaces0 words0 sentences0 lines

Examples

User First Name

user_first_name

createdAtDate

created_at_date

background-color

background_color

Where snake_case Is the Convention

  • Variables and functions in Python, as recommended by PEP 8
  • Variables and methods in Ruby
  • Variables and functions in Rust
  • Table and column names in many SQL databases
  • Property names in some JSON APIs

Why snake_case Suits Database Columns

Some databases fold unquoted names to a single case. PostgreSQL, for example, turns an unquoted createdAt into createdat. Lowercase names with underscores stay readable and avoid the need to quote them in every query.

snake_case vs kebab-case

The two look alike, but hyphens read as a minus sign in most programming languages, so they cannot be used in variable names. Underscores are allowed, which is why snake_case is common in code and kebab-case is more common in URLs and CSS.

Other Case Converters

Frequently Asked Questions