Skip to content

snake_case Converter

Turn names and phrases into snake_case identifiers for databases, Python, environment variables and config keys.

Processed locally in your browser

Options
0 chars · 0 lines
The result will appear here.

What is snake_case Converter?

snake_case joins lowercase words with underscores (user_first_name). It is the convention for Python variables, SQL columns and Ruby, while SCREAMING_SNAKE_CASE (USER_FIRST_NAME) is used for constants and environment variables. Pascal_Snake_Case capitalizes each word and keeps the underscores.

This converter splits camelCase and acronyms correctly ("HTTPResponseCode" becomes http_response_code), separates numbers from letters, and has a path-aware mode: with "keep dots, slashes and colons" a key such as Order.LineItems.UnitPrice becomes order.line_items.unit_price, converting each segment while preserving the structure.

How does it work?

  1. Paste your names, one per line.
  2. Choose snake_case, SCREAMING_SNAKE_CASE or Pascal_Snake_Case.
  3. Turn on "keep dots, slashes and colons" for dotted keys or paths, and decide whether numbers are split from letters (version2 → version_2).

Common use cases

  • Converting JavaScript property names to database column names.
  • Generating CONSTANT_NAMES or environment variables (API_BASE_URL) from readable labels.
  • Renaming JSON keys from camelCase to snake_case for a Python or Ruby API.
  • Normalizing dotted config keys segment by segment.

Examples

Try this input in the tool above:

Input
userFirstName
HTTPResponseCode
Order.LineItems.UnitPrice
Get user by ID
Output
user_first_name
http_response_code
order.line_items.unit_price
get_user_by_id

Privacy

snake_case Converter runs entirely in your browser. The text or files you provide are processed on your device and are not uploaded, logged or stored on our servers.

Limitations

The result depends on how your source is capitalized: "Wifi" and "WiFi" split differently. Review acronyms and brand names.

Frequently asked questions

What does "keep dots, slashes and colons" do?

It leaves . / : \ where they are and converts each part on its own, so a.b.c paths and namespaces like App::UserName keep their structure.

How are digits treated?

By default digits become their own word ("version2Beta" → version_2_beta). Disable the option to get version2_beta.

More tools in Text Tools →