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
HTTPRequestbecomesHTTPandRequest, - 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
| Style | Example | Typical use |
|---|---|---|
| camelCase | helloWorld | JavaScript variables, JSON keys |
| PascalCase | HelloWorld | Class names in JS/TS/C#, React components |
| snake_case | hello_world | Python variables, database column names |
| SCREAMING_SNAKE | HELLO_WORLD | Environment variables, constants |
| kebab-case | hello-world | CSS classes, HTML attributes, URL slugs |
| Train-Case | Hello-World | HTTP header names, some config files |
| dot.case | hello.world | Package names, some config keys |
| path/case | hello/world | File paths, import paths |
| CONSTANT_CASE | HELLO_WORLD | Same as SCREAMING_SNAKE, listed for clarity |
| Title Case | Hello World | Headings, display labels |
Worked example
The input helloWorld_exampleHTTPRequest v2 passes through the splitter as follows:
helloWorldsplits at theWboundary →hello,worldexampleHTTPRequestsplits atHTTP(acronym boundary beforeR) →example,http,requestv2splits 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 Python → how-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.