Skip to content
UniKit

Case converter

Convert text to 10 naming conventions at once — camelCase, PascalCase, snake_case, SCREAMING_SNAKE_CASE, kebab-case and more, with correct acronym, digit and separator handling.

Runs in your browserEvery computation happens in your browser — your data never leaves this device.

Text

All naming conventions

Acronyms, digits and separators are recombined on word boundaries; each row copies on its own.

Type some text to see all 10 naming conventions

What this tool does

  • Turn a heading or sentence into all 10 naming conventions at once and copy whichever you need instead of hunting for a separate tool per style.
  • Rename across languages: convert Java-style `XMLHttpRequest` into Python-style `xml_http_request`, with acronym and digit boundaries handled by rule.
  • Check the word-splitting rules on one sample before batch-converting API field names from snake_case to camelCase or kebab-case.
  • Generate constant names: `user_id_2` → `USER_ID_2`, or a Title Case version like `User Id 2` for display text.

Example

Input

XMLHttpRequest user_id_2

Output

camelCase: xmlHttpRequestUserId2
PascalCase: XmlHttpRequestUserId2
snake_case: xml_http_request_user_id_2
SCREAMING_SNAKE_CASE: XML_HTTP_REQUEST_USER_ID_2
kebab-case: xml-http-request-user-id-2
dot.case: xml.http.request.user.id.2
Title Case: Xml Http Request User Id 2
Sentence case: Xml http request user id 2
Lower case with spaces: xml http request user id 2
CONSTANT_CASE: XML_HTTP_REQUEST_USER_ID_2

This is the real output. Acronyms split into Xml + Http + Request and digits become their own words (id + 2), so camelCase is `xmlHttpRequestUserId2`.

Frequently asked questions

How are acronyms handled?

They split on case boundaries: `XMLHttpRequest` becomes XML + Http + Request, and `HTTPServer` becomes HTTP + Server. PascalCase therefore yields `XmlHttpRequest` with only the first letter capitalised. That matches most code formatters, but it differs from the hand-written `XMLHttpRequest` — if you must keep an all-caps acronym, fix it by hand.

Why are digits split out too?

Because `user_id_2` and `user2id` have different semantic boundaries. The tool splits wherever a letter meets a digit, so `user_id_2` gives user, id and 2 — snake_case stays `user_id_2` and dot.case becomes `user.id.2`. When the digit is part of the word (`utf8`, `sha256`) it is separated anyway, into utf + 8, and needs fixing by hand.

What happens to Chinese characters and emoji?

A run of Han, hiragana or katakana characters is kept as a single word and is unaffected by case conversion; emoji, punctuation and other non-alphanumeric characters act as separators and are dropped. So “用户 登录” yields two Chinese words joined by an underscore in snake_case.

How do Sentence case and Title Case differ?

Title Case capitalises every word (`User Id 2`), while Sentence case capitalises only the first and lowercases the rest (`User id 2`). Both join with spaces and are handy for display copy or commit titles.

Is the text uploaded?

No. All 10 styles are computed instantly in your browser, the page makes no network requests, and the input is never logged.

Keywords:case converter命名风格转换camelCase驼峰命名PascalCasesnake_case下划线命名kebab-case短横线命名CONSTANT_CASE大小写转换

Related tools