Snake Case Converter

Convert text to snake_case.

FreeNo accountOn your device

Runs in your browser. How to verify

Loading tool…

About this tool

Paste a phrase and press Run to get snake_case: all lowercase, words joined by underscores. It is the usual style for Python variables and database columns.

How to use

1
Step 1
Paste the phrase into Input.
2
Step 2
Press Run.
3
Step 3
Copy the snake_case result.

How it works

The text is split into words at spaces, hyphens, punctuation and camelCase boundaries (helloWorld becomes hello_world), each word is lowercased, and the words are joined with underscores. Accented and non-Latin letters are kept.

Worked example

A heading as a column name

Input
Hello World-Example text
Output
hello_world_example_text
Walkthrough
Four words are found, lowercased and joined with underscores.

Limitations

  • Accented letters count as separators: Crème brûlée recipe becomes cr_me_br_l_e_recipe.
  • camelCase words are not split at the capital letters.

Questions

What is snake_case used for?
Python variable names, SQL column names and many file and API field names.
Why does my accented text come out broken?
Only A to Z and 0 to 9 are kept. Replace accented letters first.
Does it split camelCase?
No. helloWorld is treated as one word and becomes helloworld.

Features

  • Lowercase with underscores
  • Mixed separators handled
  • Runs in your browser

Related resources

Guides and videos from around the web—opens on YouTube or the publisher’s site.

  • CSS Flexbox Crash Course

    freeCodeCamp.org

    Case and spacing tools show up constantly in front-end copy.

    Watch on YouTube
  • HTML in 100 Seconds

    Fireship

    Quick HTML mental model next to text transform tools.

    Watch on YouTube