snake_case Converter

Convert words to snake_case, kebab-case, CONSTANT_CASE, or dot.case for code and config.

100% Browser-Based Local Processing
15px

Ln 1, Col 1 No selection

Separator style

Python and Ruby use snake_case; URLs, CSS classes and file names use kebab-case; CONSTANT_CASE is for values that never change; dot.case turns up in config keys and namespaces.

snake_case Nothing to convert
Words found
0
Identifier length
0

All four styles split camelCase at its humps, so getUserName becomes get_user_name rather than one long token. Swap in moves the result back into the editor, which is how you convert once and then convert again — snake_case a phrase, then take that to CONSTANT_CASE — without retyping it.

Privacy Focused

🔒 Local Processing. Your text never leaves your device.

Instant Results

🌐 Fully Client-Side. Runs instantly in your browser.

No Signup

⚡ No accounts. No API keys. Just open and use.

Browser Based

🚀 No installs, no sign-ups, no character limits.

What is a snake_case Converter?

snake_case Converter turns words or phrases into snake_case, kebab-case, CONSTANT_CASE, or dot.case — the lowercase, separator-joined styles used for variables, filenames, CSS classes, and config keys. Paste 'user first name' and get 'user_first_name' or 'user-first-name'. It runs entirely in your browser, so your text stays private.

Code and config are full of separator-joined names: snake_case for Python variables, kebab-case for CSS classes and URLs, CONSTANT_CASE for constants, dot.case for config keys. Converting a phrase by hand means typing underscores or hyphens between every word.

This tool does it in one click. Paste your phrase, pick a style, and copy — all in your browser, nothing uploaded.

How to convert text to snake_case

Step 1: Paste or type the words or phrase (camelCase input works too)

Paste or type the words or phrase (camelCase input works too).

Step 2: Choose snake_case, kebab-case, CONSTANT_CASE, or dot.case

Choose snake_case, kebab-case, CONSTANT_CASE, or dot.case.

Step 3: Convert, then copy the result into your code or config

Convert, then copy the result into your code or config.

snake_case Converter in action

snake_case Converter turning a phrase into snake_case in the browser.
snake_case result
A phrase converted to snake, kebab, constant, and dot styles.
Style toggle
Converting to snake_case on a phone, no app installed.
Mobile (stacked)

snake, kebab, constant, and dot — which to use

These styles all lowercase the words and join them with a separator; they differ in the separator and casing. snake_case uses underscores ('user_name') and is common for Python and Ruby variables and for database columns. kebab-case uses hyphens ('user-name') and suits CSS class names, HTML attributes, and URL slugs. CONSTANT_CASE (SCREAMING_SNAKE_CASE) uppercases everything with underscores ('MAX_SIZE') for constants and environment variables. dot.case joins with periods ('app.user.name') for config keys and namespaces. The converter splits your input on spaces, hyphens, underscores, and camelCase boundaries, so it can convert between any of these and camelCase too. Everything runs locally. For camelCase or PascalCase, use the camelCase converter; for clean URL slugs, the Text to Slug tool; to format whole files, the dev tools.

Frequently Asked Questions

What is snake_case?

snake_case writes words in lowercase joined by underscores, like 'first_name' or 'max_retry_count'. It's widely used for variable names in Python and Ruby and for database column names. This tool converts any phrase or identifier into snake_case in one click.

What's the difference between snake_case and kebab-case?

They differ only in the separator: snake_case joins words with underscores ('user_name'), while kebab-case joins them with hyphens ('user-name'). snake_case is common in code variables; kebab-case suits CSS classes, HTML attributes, and URL slugs where underscores are discouraged.

What are CONSTANT_CASE and dot.case for?

CONSTANT_CASE (also SCREAMING_SNAKE_CASE) is uppercase words joined by underscores, used for constants and environment variables like 'MAX_SIZE' or 'API_KEY'. dot.case joins lowercase words with periods, used for config keys and namespaces such as 'app.database.host'. Both are available as toggles here.

Can it convert camelCase to snake_case?

Yes. The converter detects camelCase and PascalCase boundaries, so 'userFirstName' splits into the right words and becomes 'user_first_name' (or your chosen style). That makes it easy to switch an identifier between naming conventions without retyping.

How are acronyms and numbers handled?

Numbers stay attached to their word ('addressLine2' → 'address_line_2'), and runs of capitals from acronyms are split using a sensible heuristic. Because teams differ on acronym handling, check the result for identifiers containing things like 'HTML' or 'ID' and adjust if your convention differs.

Is this related to the developer tools?

Yes — it's the text-focused companion to Randomly's dev tools. This page converts a phrase into a single snake/kebab/constant/dot identifier; to format or minify whole files, or to slugify for URLs, use the dedicated dev tools and the Text to Slug tool, both linked here.

Is my text private — is anything uploaded?

No. Everything runs in your browser, so whatever you type or paste is processed on your own device and never uploaded to a server. Nothing is stored once you close the tab. That keeps your text — notes, code, documents, lists — completely private.

Is it free, and do I need to sign up?

Yes, it's completely free with no account, no trial, and no limit on how many times you use it. Because it runs entirely in your browser, there are no server costs, no usage caps, and no watermark or branding added to your text.

Does it work on a phone?

Yes. It runs in your phone's browser with nothing to install, so you can use it on Android or iOS. The layout adapts to small screens, so you can paste text, get the result, and copy it on the go just as easily as on a computer.

Does it work offline?

Once the page has loaded, it runs entirely on your device, so it keeps working without a connection — which is also why nothing is uploaded. You only need to be online to open the page the first time; after that the tool works locally.

Can I copy or download the result?

Yes. You can copy the result to your clipboard with one click, and longer output can be downloaded as a text file. Everything is processed locally, so copying and downloading are instant with no upload step and no waiting.

Is there a limit on how much text I can process?

There's no artificial cap, because the work happens on your device rather than a server. The practical limit is your device's memory, so very large inputs are smoother on a computer than an older phone. For most everyday text, processing is effectively instant.

Still have questions?

If you can't find the answer you're looking for, feel free to contact our support team.

Contact Us