Text Tools

snake_case converter.

Turn a phrase, camelCase or kebab-case name into snake_case, or CONSTANT_CASE for constants. One name per line.

Advertisement

Your text

Privacy: everything runs in this browser. Your text is not uploaded or saved.

Pick a case

Result

snake_case

Type or paste text above and the result appears here.

About this snake_case converter

snake_case writes every word in lowercase and joins them with underscores: First Name becomes first_name. CONSTANT_CASE is the same in capitals (FIRST_NAME). The same engine also gives kebab-case (first-name) and dot.case (first.name).

How the words are found

Where each style is used

PEP 8 recommends lowercase names with words separated by underscores for Python functions and variables, and all-capitals with underscores for constants. Oracle's Java conventions also write constants in capitals with underscores. For web addresses, Google recommends hyphens rather than underscores between words, which is the kebab-case option here.

Examples

snake_case and related examples
InputCaseResult
First Namesnake_casefirst_name
userIdsnake_caseuser_id
XMLHttpRequestsnake_casexml_http_request
max retry countCONSTANT_CASEMAX_RETRY_COUNT
My Blog Post Titlekebab-casemy-blog-post-title

More: All 13 cases in one place: Case Converter · Uppercase Converter · Lowercase Converter · Title Case Converter · Sentence Case Converter · camelCase Converter · Alphabetical Order Sorter

Sources (retrieved October 2026): PEP 8, Naming Conventions; Google JavaScript Style Guide, Naming; Oracle, Java Code Conventions, Naming Conventions; Google Search Central, URL structure.

FAQ: snake_case converter

How do I convert text to snake_case?

Type or paste the phrase. Each word is lowercased and the words are joined with underscores. Use the buttons for CONSTANT_CASE, kebab-case or dot.case.

How do I convert camelCase to snake_case?

Paste the camelCase name. The converter splits it at each capital letter, so myVariableName becomes my_variable_name, and acronyms stay together (parseHTMLString becomes parse_html_string).

Should I use underscores or hyphens in URLs?

Google recommends hyphens to separate words in a URL, because it treats them as word separators, while underscores are not. Use the kebab-case button for slugs, or the slug generator.

Can I convert a whole list?

Yes. Put one name per line; each line is converted separately and the line breaks are kept.

Copied to clipboard
Advertisement
Advertisement