Convert text to snake_case

UPPERCASE, lowercase, Title Case, Sentence case, camelCase, snake_case and more.

Input

Output

Words 10Characters 69Without spaces 60Sentences 1Lines 4Paragraphs 1Reading time < 1 min

About snake_case Converter

snake_case writes words in lowercase joined by underscores, as in first_name or last_login_date. It is the standard style for Python variables and functions, Ruby methods, and table and column names in most SQL databases.

Paste readable phrases, spreadsheet headings or camelCase names, and each line becomes one snake_case identifier. Capital letters inside a word, spaces, hyphens and punctuation all mark word breaks. Your names are converted locally and not uploaded.

How to use it

  1. Paste names or phrases into the Input box, one per line, or press Sample.
  2. Each line appears in snake_case on the right.
  3. Copy the result, or choose CONSTANT_CASE or kebab-case from the Case menu if you need those.

Frequently asked questions

When should I use snake_case instead of camelCase?

Follow the language or system you are writing for: snake_case for Python (PEP 8), Ruby and SQL columns, camelCase for JavaScript and Java. Being consistent within a project matters more than the choice itself.

What is CONSTANT_CASE?

snake_case in capitals, such as MAX_RETRY_COUNT. Many languages use it for constants and environment variables, and it is in the Case menu.

Does it convert camelCase input correctly?

Yes. A capital letter inside a word starts a new word, so lastLoginDate becomes last_login_date and HTTPServer becomes http_server.

Related tools