Snake Case Converter
Convert text and variable names to snake_case. Handles spaces, hyphens, and camelCase, producing clean lowercase identifiers.
Independently verified for accuracy
Calculator by Toolsloft ↗- snake_case
- hello_world_example
Convert any text or variable name into snake_case, the all-lowercase-with-underscores style used in Python, Ruby, and database columns. It reads spaces, hyphens, and camelCase humps as word boundaries, so you can paste almost anything and get a clean result. Handy when you are renaming fields or normalizing identifiers.
How this is calculated
The input is split into words at every run of non-alphanumeric characters and at each camelCase or acronym boundary (for example "HTMLParser" splits into HTML and Parser). Each word is lowercased and the words are joined with a single underscore.
How to use
- Paste the text or identifier you want to convert.
- Read the snake_case result.
- Copy it into your code or database.
Examples
- From camelCase:
camelCaseText becomes camel_case_text - From a phrase:
Hello World becomes hello_world
FAQ
- Does it split camelCase words?
- Yes. A lowercase or digit followed by an uppercase letter is treated as a word boundary, so "myValue" becomes "my_value".
- What happens to punctuation?
- Any run of non-alphanumeric characters, including punctuation and multiple spaces, is treated as a single word separator.