Xerobit

Case Converter

Convert text between 14 case styles, camelCase, PascalCase, snake_case, CONSTANT_CASE, kebab-case, Title Case, sentence case, and more. Smart tokenizer handles camelCase, PascalCase, snake, kebab, and dot-separated input. Bulk mode processes one item per line.

Type to see all case variants.

Which case to use where

  • camelCase: JavaScript variables, TypeScript, Java methods/fields. userName.
  • PascalCase: classes, types, React components. UserProfile.
  • snake_case: Python variables/functions, Ruby, SQL column names. user_name.
  • CONSTANT_CASE (SCREAMING_SNAKE): constants in C, C++, JavaScript. MAX_RETRIES.
  • kebab-case: URLs, CSS class names, CLI flags, HTML attributes. user-name.
  • UPPER-KEBAB: HTTP headers. CONTENT-TYPE.
  • dot.case: package names in Java, config keys. user.profile.name.
  • path/case: URL paths, filesystem. user/profile/name.
  • Title Case: headings, book titles, article titles.
  • sentence case: regular prose with just the first word capitalized.

Smart tokenization

This tool's tokenizer recognizes all common conventions as input. Paste fooBarBaz, FooBarBaz, foo_bar_baz, foo-bar-baz, or foo.bar.baz: all produce the same three tokens. Consecutive capitals are handled correctly: XMLParser becomes xml and parser, not x and mlparser.

Bulk mode

Paste one item per line, turn on bulk mode, and every line converts independently. Useful for migrating variable names, converting CSV column headers, or mass-renaming.

Common case-conversion bugs

  • Word boundaries: naive converters split "HTMLParser" into "h", "t", "m", "l", "parser" or join it as "Htmlparser". This tool uses the capital-followed-by-capital-then-lowercase heuristic to keep acronyms intact.
  • Trailing separators: "foo__bar" should tokenize to foo, bar, not include an empty token.
  • Numbers: "version2" is typically one token (version2). "v2API" is v2 + api.

FAQ

Does this preserve Unicode characters?

Yes, ASCII-like tokenization with Unicode-preserving case transforms. Non-Latin scripts pass through.

Why does "alternating case" look slightly different than expected?

It alternates position-by-position in the final string (including spaces). If you want whole-word alternation, that's a different pattern, open an issue.

Pillar