String Case Converter

Convert text between camelCase, snake_case, PascalCase, kebab-case

Splits input on separators, camelCase boundaries, acronyms, and digit transitions, then converts it to ten case styles including camelCase, PascalCase, snake_case, SCREAMING_SNAKE, kebab-case, and Title Case. Client-side. It runs free in your browser on Gera Tools, with nothing uploaded.

Last updated Source: Gera Tools

How does it split mixed input like helloHTTPRequest?

It inserts boundaries at lower-to-upper transitions, between an acronym and the next word (HTTP then Request), at letter-to-digit and digit-to-letter changes, and at any separator such as space, underscore, hyphen, dot, or slash.

Identifiers come in many naming conventions, and switching between them by hand is tedious and error-prone. A variable might be helloWorld in JavaScript, hello_world in Python, hello-world in a CSS class, and HELLO_WORLD as an environment variable. This string case converter turns any input into ten common case styles, all in your browser.

How it works

The hard part of case conversion is not the joining, it is splitting the input into words regardless of how it was originally written. The converter inserts word boundaries at:

  • camelCase and PascalCase transitions, where a lowercase letter or digit is followed by an uppercase letter,
  • acronym boundaries, where a run of capitals is followed by a capital-then-lowercase pair, so HTTPRequest becomes HTTP and Request,
  • letter-to-digit and digit-to-letter changes, and
  • any separator character such as space, underscore, hyphen, dot, or slash.

Each word is lowercased, and then every output style re-joins the words with the right separator and capitalisation.

The ten output styles and where each is used

StyleExampleTypical use
camelCasehelloWorldJavaScript variables, JSON keys
PascalCaseHelloWorldClass names in JS/TS/C#, React components
snake_casehello_worldPython variables, database column names
SCREAMING_SNAKEHELLO_WORLDEnvironment variables, constants
kebab-casehello-worldCSS classes, HTML attributes, URL slugs
Train-CaseHello-WorldHTTP header names, some config files
dot.casehello.worldPackage names, some config keys
path/casehello/worldFile paths, import paths
CONSTANT_CASEHELLO_WORLDSame as SCREAMING_SNAKE, listed for clarity
Title CaseHello WorldHeadings, display labels

Worked example

The input helloWorld_exampleHTTPRequest v2 passes through the splitter as follows:

  1. helloWorld splits at the W boundary → hello, world
  2. exampleHTTPRequest splits at HTTP (acronym boundary before R) → example, http, request
  3. v2 splits at the digit → v, 2

Final word list: hello world example http request v 2

Then each style re-joins:

  • camelCase: helloWorldExampleHttpRequestV2
  • snake_case: hello_world_example_http_request_v_2
  • kebab-case: hello-world-example-http-request-v-2
  • SCREAMING_SNAKE: HELLO_WORLD_EXAMPLE_HTTP_REQUEST_V_2

Common use cases

Renaming identifiers across languages. When porting code from Python (snake_case) to JavaScript (camelCase), paste each identifier and copy the output without manually tracking every underscore.

Generating database column names. A display label like “First Name” becomes first_name for a database column or firstName for a JSON API field — paste the label and copy both.

Creating URL slugs. A blog post title becomes a URL-safe slug in kebab-case: How to Use strftime in Pythonhow-to-use-strftime-in-python.

Environment variables. A setting name from a config file becomes a SCREAMING_SNAKE_CASE env var without manual editing.

Because the converter normalises everything to a clean word list first, you can paste input that already mixes styles and still get consistent output. Everything runs locally, so identifiers from private code never leave your device.