Developer tools

snake_case Converter

snake_case Converter

Convert text, camelCase or PascalCase names to snake_case.

About this tool

About snake_case Converter

snake_case writes every word in lowercase and joins them with underscores: order_total, created_at, send_welcome_email. PEP 8 makes it the standard for Python variables, functions and module names, Ruby and Rust use it for methods and variables, and it is the most common style for SQL table and column names because many databases fold unquoted identifiers to one case. Paste a camelCase property from a JSON response, a PascalCase class or a plain English label and get the snake_case version straight away. The splitter knows where words begin inside acronyms, so getHTTPResponse becomes get_http_response and userID becomes user_id rather than user_i_d. Paste every field of an API payload, one per line, to get the matching column list for a migration or a Pydantic model. CONSTANT_CASE, the uppercase form used for constants, is one click away in the All cases list. Conversion runs entirely in your browser.

Built and maintained by Abhi JainUpdated

How to Convert Text to snake_case

  1. 1

    Paste names

    Paste words, camelCase or PascalCase names into the Text box, one per line.

  2. 2

    Read the snake_case result

    snake_case is selected, so the converted names show under the Text box.

  3. 3

    Copy

    Copy or download the list, or take CONSTANT_CASE from All cases.

snake_case Converter: questions and answers

What is snake_case?

A naming style where words are lowercase and separated by underscores, like max_retry_count. The underscores sit low like a snake along the ground.

Why does Python use snake_case?

Python's style guide, PEP 8, recommends lowercase with underscores for functions, variables and modules because it reads more easily than squashed-together words. Classes use PascalCase and constants use UPPER_SNAKE_CASE.

Should database columns be snake_case?

It is the most common choice. PostgreSQL folds unquoted names to lowercase, so camelCase columns need quoting everywhere, while snake_case works without quotes in every major database.

How do I convert camelCase to snake_case?

Paste the camelCase names here. The tool inserts a break before each capital that follows a lowercase letter or digit, and inside acronyms before the last capital, then lowercases everything and joins the words with underscores.