snake_case converter

Paste a phrase, a camelCase name or a kebab-case name and get snake_case: all lowercase, words joined by underscores.

  • Free
  • No sign-up
  • Runs in your browser
case-snake

100% private — your text is processed in your browser and never sent to any server.

How it works

Paste your text

Type or paste anything, one line or many.

Choose the style

The style is already selected for you on this page; change it any time.

Copy the result

It updates as you type. Copy it or download it as a text file.

How to convert text to snake_case

To convert text to snake_case, paste it in the box above and the result appears instantly in the output box, ready to copy. The style is already selected on this page. Every line is converted on its own, accents and other alphabets are respected, and nothing is uploaded because it all runs in your browser.

What it does

snake_case writes every word in lowercase and joins them with underscores. It is the standard for variable and function names in Python and Ruby, for database table and column names in SQL, and for file names and configuration keys in many projects. Its sibling SCREAMING_SNAKE_CASE, in capitals, is used for constants.

Examples

Examples
BeforeAfter
User First Nameuser_first_name
orderLineItemorder_line_item
shopping-cart-totalshopping_cart_total
Total Amount (EUR)total_amount_eur

Where it is used

  • Python and Ruby code: variables, functions and module names follow PEP 8 and community style.
  • SQL tables and columns, where underscores avoid quoting and case problems.
  • JSON keys and configuration files for APIs that use snake_case, such as many Python and Ruby back ends.
  • Turning spreadsheet headers into clean column names before an import.

Tips and things to check

  • Existing camelCase names are split at each capital, so orderLineItem becomes order_line_item.
  • Punctuation and symbols, such as the brackets in the last example, are dropped rather than kept as underscores.
  • For constants, use CONSTANT_CASE, which is snake_case in capitals.

Private by design

Your text is processed in your browser and never sent to a server, so you can safely convert drafts, contracts, code or anything private.

Frequently asked questions

What is snake_case used for?
It is the standard naming style in Python and Ruby, and it is very common for database columns and configuration keys because it stays readable in lowercase-only systems.
What is the difference between snake_case and kebab-case?
snake_case joins words with underscores and kebab-case with hyphens. Underscores are valid in code identifiers; hyphens are not, but are preferred in URLs and CSS class names.
Does it handle several lines?
Yes. Each line is converted separately, which makes it handy for lists of column names.
Is this converter free?
Yes. There is no sign-up and no limit, and it runs in your browser, so nothing you type is sent to a server.
Does it work on a phone?
Yes. It works in any modern mobile browser, and the result updates as you type.