Convert to snake_case

Turn phrases into snake_case identifiers — the standard for Python, Ruby and SQL.

Convert any text to snake_case for Python, Ruby and database column names. Free developer tool.

Convert to snake_case examples

InputOutput
Order Total Priceorder_total_price

How the convert to snake_case works

  1. Split into words at any separator.
  2. Lowercase every word.
  3. Join with underscores.

Rules and edge cases

  • Words are lowercased and joined with underscores, whatever separator the input used.
  • camelCase input is split correctly, so orderTotalPrice becomes order_total_price.
  • Punctuation is dropped and repeated separators collapse to one underscore.
  • The snake_case converter page carries the same engine plus background on where the convention applies.

Frequently asked questions

How do I get CONSTANT_CASE instead?

Convert to snake_case, then run the result through the uppercase converter — CONSTANT_CASE is snake_case in capitals.

Will it convert a full SQL column list?

Yes. Paste one column name per line and every line is converted independently.