ConvertCaseTool

Accidentally typed your text in the wrong case?

Simply drop your text below to quickly convert it into uppercase, lowercase, title case, sentence case, and other text formats using our free online case converter.

0 chars·0 words·0 lines

What is a snake_case converter?

A snake_case converter transforms text into the underscore-separated lowercase naming format used across Python, Ruby, SQL databases, and file systems. It strips punctuation, replaces spaces and separators with underscores, and lowercases every letter — producing clean, consistent identifiers ready to paste into code.

Before & After

Before

Get User Profile By ID

After

get_user_profile_by_id

Before

firstName

After

first_name

Before

background-color

After

background_color

Where snake_case is used

  • Python

    PEP 8 — the official Python style guide — mandates snake_case for all variable, function, and module names.

  • SQL & databases

    Table names, column names, and index names in PostgreSQL, MySQL, and SQLite follow snake_case by convention.

  • Ruby & Rails

    Ruby variables, methods, and ActiveRecord column names use snake_case throughout.

  • File & directory names

    snake_case file names are readable, URL-safe, and avoid case-sensitivity issues across operating systems.

  • REST API fields (Python/Ruby)

    Python and Ruby APIs commonly return JSON with snake_case keys — unlike JavaScript APIs which use camelCase.

Frequently asked questions

What is snake_case?

snake_case is a naming convention where all letters are lowercase and words are separated by underscores. Example: "user first name" becomes "user_first_name". The name comes from the low, flat appearance of the underscore resembling a snake.

When should I use snake_case?

snake_case is standard for: Python variable and function names, Ruby variables and methods, database table and column names, file and directory names in many projects, environment variable names (though these use SCREAMING_SNAKE_CASE), and PostgreSQL identifiers.

What is the difference between snake_case and camelCase?

snake_case uses underscores between all lowercase words (user_first_name). camelCase uses no separator and capitalises internal words (userFirstName). Python uses snake_case; JavaScript uses camelCase.

What is SCREAMING_SNAKE_CASE?

SCREAMING_SNAKE_CASE (also called CONSTANT_CASE) is snake_case but with all letters in uppercase — used for constants and environment variables like DATABASE_URL or MAX_CONNECTIONS.

Can I convert camelCase or kebab-case to snake_case?

Yes. Paste camelCase, kebab-case, Title Case, or plain text — the converter strips all separators and outputs clean snake_case.

Does snake_case work for database column names?

Yes, and it is the recommended convention for SQL databases, especially PostgreSQL, where identifiers are case-insensitive and snake_case is universally readable across all query tools.

Related tools