String Case Converter

Convert any text or identifier between camelCase, PascalCase, snake_case, kebab-case, SCREAMING_SNAKE_CASE, Title Case, dot.case, and path/case — instantly in your browser.

Input
Try:
hello world
getUserName
MY_CONSTANT_VALUE
convert-this-string
The Quick Brown Fox
Converted Results

How to Use

  1. Type or paste any string into the input box above. You can enter natural language (hello world), an existing variable name (getUserById), or even a constant (MAX_RETRY_COUNT). The converter automatically detects word boundaries from spaces, hyphens, underscores, dots, slashes, and camelCase transitions.
  2. All eight case formats update instantly as you type. Each result row shows the label on the left and the converted string on the right.
  3. Click Copy next to any result to copy it directly to your clipboard. The button briefly confirms the copy with a green flash.
  4. Use the Try example chips below the input to test with common formats and see how each is handled.

About Case Formats

Naming conventions vary by language, framework, and team style guide. Here is a quick reference for when to use each format:

camelCase
First word lowercase, subsequent words capitalized. Used for variables and functions in JavaScript, Java, Swift, and Go.
PascalCase
All words capitalized. The standard for class names and types in C#, Java, TypeScript, and React components.
snake_case
All lowercase, words separated by underscores. Default for Python variables, functions, and Ruby methods.
kebab-case
All lowercase, words joined by hyphens. Used in CSS class names, HTML attributes, URL slugs, and Lisp-family languages.
SCREAMING_SNAKE
All uppercase with underscores. The universal convention for constants and environment variables across most languages.
Title Case
Each word capitalized with spaces. Used in headings, page titles, button labels, and navigation menus.
dot.case
Lowercase words joined by dots. Used in configuration keys (e.g. app.server.port), package names, and object notation.
path/case
Lowercase words separated by forward slashes. Common in file system paths, URL segments, and module imports.

Frequently Asked Questions

How does the converter detect word boundaries?

The converter splits on: spaces, hyphens, underscores, dots, and forward slashes. It also detects camelCase and PascalCase transitions using a regex that matches boundaries where a lowercase letter is immediately followed by an uppercase letter (e.g. getUserId["get","User","Id"]) and where a sequence of uppercase letters transitions to a lowercase letter (e.g. parseHTTPResponse["parse","HTTP","Response"]). Numbers are treated as word boundaries when adjacent to letters.

What happens to numbers in the input?

Numbers are preserved as-is within words. The string base64Encoder converts to base64_encoder in snake_case. Standalone numbers like version2 are treated as a single word unit, producing version2, Version2, or VERSION2 depending on the target format. Leading and trailing numbers follow the same rules.

Why is SCREAMING_SNAKE_CASE used for constants?

Uppercase identifiers with underscores visually stand out from regular variables and function names, making it immediately clear that a value should not be reassigned. This convention originates from C and was adopted by virtually every mainstream language. In Python it signals a module-level constant; in JavaScript and Java it is used for const declarations and static final fields respectively. Modern linters enforce this convention automatically.

Does this tool send my text to any server?

No. All string manipulation runs entirely in JavaScript inside your browser. Nothing you type is transmitted anywhere. You can verify this by opening your browser’s DevTools Network panel — you will see zero outbound requests after the page loads.

Related Tools