Text Tools

Snake Case

All tools

Rewrite names as lowercase words joined by underscores, ready for Python or a database column.

How it works

Four simple steps

1

Paste any phrase

Add camelCase, kebab-case, or plain English text.

2

Normalize tokens

Words are lowercased and joined with underscores.

3

Emit snake_case

Spaces and capitals convert to underscore separators.

4

Copy snake_case

Copy the identifier for Python vars or DB columns.

Snake Case

About Snake Case

You are mapping a JSON payload with keys like customerId and orderDate onto a Postgres table, and the column naming convention is snake_case. Paste each key here and you get customer_id and order_date without retyping.

Unlike the camelCase and PascalCase converters on this site, this one does detect camelCase boundaries. A lowercase letter or digit followed by a capital gets an underscore between them, so "orderDate" becomes "order_date". Spaces, hyphens and dots turn into single underscores, any other punctuation is removed, and the result is lowercased.

Runs of capitals are not split, so "HTTPServer" comes out as "httpserver" and "parseJSONData" as "parse_jsondata". Insert a space where you want the break. Accented letters are removed rather than converted, and line breaks also become underscores, so a pasted list turns into one long name. Existing underscores are kept as they are.

For URL segments or CSS class names, the kebab-case converter applies the same logic with hyphens. Going the other way, from database columns back to JavaScript, use camelCase. The text is processed by a short script in this tab and is not stored anywhere.

Keyboard shortcut

Ctrl Enter - Run tool
FAQ

Frequently asked questions

See all FAQs

Answers for this tool. For site-wide help, open the FAQ hub.

Yes. An underscore is added wherever a lowercase letter or digit is followed by a capital, so totalAmount2Due becomes total_amount2_due.

The output is always lowercase. For constant names, convert here and then run the result through the UPPER style in the Case Converter, which keeps the underscores.

They are deleted. Only letters, digits and underscores survive, so "price (USD)" becomes price_usd.

View more FAQs

Related tools

View all

Uppercase

Convert text to UPPERCASE.

Open

Lowercase

Convert text to lowercase.

Open

Sentence Case

Capitalize first letter of sentences.

Open

Title Case

Capitalize each word.

Open

Explore 321 free tools

Everything you need as a developer, marketer or creator - in one beautiful place.

Browse all tools