All tools · Text tools

Programmer Case

Convert to camelCase, snake_case, kebab-case, and more.

Free to use, no sign-up required. Programmer Case is one of 198 tools built into Xenition, alongside a chat that can use them for you.

Converts a phrase or an existing identifier into naming styles used in code: camelCase, snake_case, PascalCase, kebab-case, CONSTANT_CASE, dot.case, path/case, Train-Case, Title Case and flatcase.

How to use Programmer Case

  1. Type a phrase or paste an identifier in any style.
  2. Tap the format buttons to choose which conversions to show; camelCase and snake_case are on by default.
  3. Click a result row to copy it.

How it works

The input is broken into words at spaces, underscores, hyphens, dots and slashes, and wherever a lowercase letter or digit is followed by a capital. A run of capitals followed by a capitalised word is split before the last capital, so HTTPServer becomes http and server. All words are lowercased, then each format rejoins them with its own separator and capitalisation.

Example

parseHTTPServer response_code splits into parse, http, server, response, code, giving parseHttpServerResponseCode, parse_http_server_response_code and PARSE_HTTP_SERVER_RESPONSE_CODE.

Questions about Programmer Case

Why does HTTP become Http in camelCase?

Every word is lowercased before rejoining and then only its first letter is capitalised, so acronyms are not kept in capitals. This matches common style guides, which prefer parseHttpServer.

Are digits treated as separate words?

No. A digit only ends a word if a capital follows it, so user ID2fa gives user and id2fa, or userId2fa in camelCase.

What it takes

Use it from chat

You do not have to open Programmer Case to use it. Ask Xenition in plain language and it runs the right tool, then carries the answer into whatever you are working on — a document, a spreadsheet, a deck.

Related tools