Case Converter

Converter

Convert text between camelCase, snake_case, kebab-case, PascalCase and CONSTANT_CASE instantly. Switch naming styles for code, configs and identifiers.

12 Formats
lower casehello world example_text
UPPER CASEHELLO WORLD EXAMPLE_TEXT
Title CaseHello World Example Text
Sentence caseHello world example text
camelCasehelloWorldExampleText
PascalCaseHelloWorldExampleText
snake_casehello_world_example_text
kebab-casehello-world-example-text
CONSTANT_CASEHELLO_WORLD_EXAMPLE_TEXT
Train-CaseHello-World-Example-Text
dot.casehello.world.example.text
path/casehello/world/example/text

About Case Converter

Casing conventions differ across languages and teams: JavaScript and Java favour lowerCamelCase, Python and database columns favour snake_case, constants are usually SCREAMING_SNAKE_CASE, class names use PascalCase, and URLs plus filenames tend to be lowercase with hyphens. Moving a phrase or a batch of identifiers between those styles is a recurring task during refactors, API integration and code generation. The mechanism splits the input on word boundaries and re-joins according to the target style. Everything hinges on that first step: camel boundaries split on capitals, while underscores, hyphens and spaces are separators, with acronyms as the exception. XMLHttpRequest could be XML plus Http plus Request or X plus M plus L, and the two produce completely different results, so acronym splitting must be agreed explicitly or normalized before conversion. Practical notes: Normalize to one form first, say lowercase with underscores, then convert to the target style; taking two steps is easier to verify than doing both at once. For batches, convert ten samples and check them before running the whole set, because a wrong splitting rule makes rework expensive at scale. With identifiers containing digits, decide whether a digit forms part of a word boundary, since tools disagree on whether base64 becomes base64 or base64 with a separator. Limits: Casing changes are many-to-one in most languages, so converting and converting back need not reproduce the original, which rules it out as a reversible operation and limits it to identifier normalization. Turkish distinguishes dotted from dotless i and German has its own ligature and capitalization rules, so generic functions surprise you on those inputs. Likewise, URL paths are case-sensitive on servers while CDN caches may not be, so switching filenames to lowercase requires updating every reference or images and stylesheets will fail to load in production. Data and privacy: what this tool touches is variable names, field names and filenames, which carry no sensitive information and make it the lowest-risk tool of the group. Conversion happens in the browser, inputs are never uploaded, and it works without a network connection. In code generation and data mapping this conversion is one step in an automated pipeline: database columns are usually snake_case while API fields are lowerCamelCase. If the mapping layer disagrees on naming, fields that plainly exist fail to resolve, a class of problem invisible at compile time and to the type checker. Writing the naming rule into the project conventions and enforcing it with a script costs far less than debugging cases one by one. One team practice is worth stressing: when you propose a naming convention, ship the automatic fixer alongside it, because a rule without tooling gets bypassed within two or three iterations. Once converted, keep a small mapping table showing how one identifier is written in code, database and API, maintained alongside the documentation, so a newcomer has a reference at the first edit instead of guessing. Adding that table to the onboarding checklist shortens the round trips before a first commit and removes a great deal of pointless naming discussion during review.

How It Works Internally

Conversion splits on word boundaries and re-joins in the target style. Splitting is the whole difficulty: camel case splits on capitals, underscores, hyphens and spaces are separators, and acronyms have no single answer — XMLHttpRequest may split into three words or five letters, producing entirely different results. Acronyms therefore have to be normalised before converting.

The splitting ambiguity
InputXMLHttpRequest
OutputAcronym kept whole → xml_http_request | Acronym split per letter → x_m_l_http_request

Measured on This Page

Fixed: CJK dropped when mixedThe old tokenizer matched Latin words only and skipped its fallback as soon as any English matched — snake_case of Hello 你好 World became hello_world with the Chinese gone. The pattern now includes CJK runs (Han/kana/hangul) and other scripts → hello_你好_world
Acronym splittingXMLHttpRequest → xml/http/request (PascalCase gives XmlHttpRequest), not xmlhttp/request
11 naming styleslower/UPPER/Title/Sentence/camelCase/PascalCase/snake_case/kebab-case/CONSTANT/Train-Case/dotCase/pathCase all match Python
DigitsuserID 42 → user/id/42 (digits become their own token rather than gluing to neighbours)

Tokenising is the only hard part of case conversion — in 10 of the 11 styles the transform itself is a single join-and-map expression. Exactly 3 boundary classes matter: camelCase mixed with underscores (example_TEXT → example, text); acronyms (XMLHttpRequest should split into xml/http/request, not xmlhttp/request); and non-Latin scripts, the most common case in Chinese projects and exactly the old build's hole — Chinese fragments were silently dropped and users assumed hello_world was intended. Note also that camelCase lowercases all-caps tokens such as ID to id, so normalise multi-word abbreviations by hand first.

How this was measured: Four samples were typed in — snake plus camel, the acronym XMLHttpRequest, Chinese mixed with English, and a string with digits — and the 11 output styles were each re-implemented in Python from the same tokenizer rule, then searched for in the rendered results; the mixed-language case was re-run after the fix. · Measured 2026-10-31

How to Use

  1. Open "Case Converter"
  2. Type a word or paste a whole paragraph
  3. The result list shows twelve naming styles
  4. Check abbreviations and digits survived intact
  5. Click the copy icon beside the style you want

Use Cases

  • Rename variables — Convert backend snake_case fields into the camelCase your frontend expects.
  • Make constants — Turn a phrase into SCREAMING_SNAKE_CASE for an enum or env var name.
  • URL slugs — Convert an article title into a kebab-case, SEO-friendly route slug.
  • Heading style — Apply Title Case or sentence case to unify docs and button copy.
  • Class names — Turn a component description into PascalCase per React/class conventions.
  • API field mapping — Transform JSON response keys between snake_case (backend) and camelCase (frontend) in bulk for API client code.
  • Database column naming — Convert database column names into consistent naming conventions across different ORM schemas and migration files.

FAQ

How does it find word boundaries?

It treats spaces, underscores, hyphens, and camel-case case transitions (like fooBar) all as separators, then recombines for the target style, so mixed input splits correctly.

Are digits treated as part of a word?

They stay attached to the adjacent word. user2Name to snake_case yields user2_name; digits are not split off, matching most code styles.

What about runs of capitals like HTTPURL?

Consecutive capitals are treated as one token; camelCase may output httpurl, so verify acronyms after converting.

Can it batch-convert multiple lines?

Yes, it processes line by line, each treated as its own piece of text — handy for tidying a column of field names at once.

I just want all upper/lower case.

Pick the UPPER or lower mode; it changes only letter case and leaves word separators untouched.

Can it handle mixed styles like user_Name-Test?

Yes. It extracts every token and rebuilds the target style, so any mixed separators normalize cleanly as long as word boundaries are clear.

After conversion some identifiers still look wrong. How do I debug this?

Some identifiers mix styles, for example carrying an uppercase acronym alongside underscores, so the splitting rule cannot tell what the author intended and keeps part of the capitalisation. Decide the word boundaries by hand for those, or normalise acronyms before converting, rather than expecting the tool to infer them. Validate on a few real samples before running the whole batch, which costs far less than rework afterwards.

How are consecutive capitals like IPAddress handled?

That is the classic camelCase ambiguity. The tool uses the common convention that consecutive capitals form one group (IPAddress → ip-address), matching most frameworks. Adjust manually if your convention differs.