Skip to content

Convert text to snake_case

Convert sentences or camelCase to snake_case, the common convention for Python variables and SQL database column names.

Processed on your device. Nothing is sent to any server.

Detects separators and case changes, then joins the lowercase words with underscores.

Use cases

  • Naming Python variables and functions.
  • Defining database column names.
  • Converting camelCase JSON keys to snake_case.

How it works

  1. 1

    Paste your text

    Type a sentence or camelCase on the left.

  2. 2

    Copy the result

    The snake_case identifier appears automatically on the right.

Technical details

  • Examples: "User First Name" → user_first_name; "userId" → user_id; "sign-up-date" → sign_up_date.
  • Accented letters are kept as they are ("café menu" → café_menu); if the identifier must be pure ASCII, remove accents first.
  • Punctuation isn't removed: "hello, world!" keeps its comma and exclamation mark. Clean it up first if the result will be a variable or file name.
  • Consecutive capitals are treated as one word: "XMLHttpRequest" splits into "XMLHttp" and "Request".

Frequently asked questions

Does it accept camelCase as input?

Yes, it detects the lowercase-to-uppercase transition as a word boundary.

Can I get SCREAMING_SNAKE_CASE for constants?

The tool always returns lowercase. Run the result through the uppercase converter afterward: max_retry_count becomes MAX_RETRY_COUNT.

← Text