Just File Tools

Case Converter

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

camelCase
PascalCase
snake_case
kebab-case
CONSTANT_CASE
Title Case
Sentence case
dot.case
UPPERCASE
lowercase

How to Case Converter Online

See your text rendered in every common casing convention at once.

  1. Paste or type your text into the input field at the top.
  2. All ten case variants update instantly as you type — there is no Convert button to click.
  3. Identify the convention you need (camelCase for JS variables, kebab-case for URLs and CSS classes, CONSTANT_CASE for environment variables, etc.).
  4. Click the Copy button next to the variant you want.
  5. Paste the result wherever you need it: editor, terminal, config file, documentation.
  6. For mixed inputs (existing camelCase, PascalCase, or snake_case), the tokenizer splits them correctly so you can convert between conventions in one step.

About Case Converter

Different programming languages, file systems, and protocols disagree about how identifiers should be written. JavaScript and Java want `camelCase` for variables and `PascalCase` for classes. Python's PEP 8 mandates `snake_case` for everything except classes. CSS and HTML class attributes prefer `kebab-case`. Environment variables are `CONSTANT_CASE` by Unix tradition. Database column names are sometimes snake_case (PostgreSQL) and sometimes camelCase (MongoDB). Whenever you cross a boundary — copying a JSON field into your codebase, naming an environment variable for a config key, or generating CSS classes from JS identifiers — you need to retokenize and re-case.

The hard part is **tokenization**, not concatenation. Given a string like `XMLHttpRequest`, the right split is `xml` + `http` + `request` — three tokens, with the acronym preserved as a unit. A naive "split on uppercase" approach yields `X` + `M` + `L` + `Http` + `Request`, which then produces grotesque output like `xMLHttpRequest` when re-cased to camelCase. The tokenizer here uses the same two-pass regex used by libraries like `change-case` and Lodash: first, insert a boundary before any uppercase letter that follows a lowercase or digit (`camelCase` → `camel Case`); second, insert a boundary before any uppercase letter followed by a lowercase, but only when the previous character is also uppercase (`XMLHttp` → `XML Http`). The result handles every common shape of mixed input correctly.

This tool shows all ten conversions at once rather than asking you to pick a target first. The cost is roughly nothing — ten string operations run in microseconds, and being able to see every variant side by side is genuinely faster than the click-then-pick flow most converters use. You can also paste output from one convention (a Python snake_case symbol) and immediately see what it should look like in another (TypeScript camelCase) without specifying the source format.

Some practical gotchas worth knowing. **Casing is lossy.** Once you tokenize `URL` to lowercase `url`, you cannot recover the acronym shape; re-casing to PascalCase gives `Url`, not `URL`. Google's Java style guide actually mandates `url` over `URL` for exactly this reason, and Microsoft's .NET guidance has moved the same way for two-letter acronyms. **Sentence case ≠ title case.** Sentence case capitalizes only the first word; Title Case capitalizes every significant word. **Title Case is opinionated.** This tool's Title Case capitalizes every word, matching APA style; some house styles (Chicago Manual of Style) keep articles, conjunctions, and short prepositions lowercase. For headline-grade title casing with style-aware rules, a dedicated typesetter is a better fit.

Everything happens in your browser. The tokenizer and ten conversion functions add about 1 KB to the page bundle. No network calls, no input logging, no third-party libraries.

Frequently Asked Questions

How does the converter handle acronyms like "XMLHttpRequest"?

The tokenizer recognizes consecutive uppercase letters as an acronym and keeps them together as one token. So `XMLHttpRequest` splits into `xml`, `http`, `request` — which converts cleanly to `XMLHttpRequest` (Pascal), `xmlHttpRequest` (camel), `xml_http_request` (snake), and `xml-http-request` (kebab). Naive splitters that look only at uppercase letters would produce `X-M-L-Http-Request`.

Why is "camelCase" lowercase-first and "PascalCase" uppercase-first?

They are sibling conventions, separated by the first character. `camelCase` is the dominant convention for JavaScript/TypeScript variables, Java method names, and Swift identifiers. `PascalCase` (also called UpperCamelCase) is used for class names in those same languages and is the default for C#/.NET style guides. Most codebases enforce one or the other via a linter rule.

What is the difference between Title Case and Sentence case?

Title Case capitalizes every significant word: "The Great Gatsby Is A Novel". Sentence case capitalizes only the first word and any proper nouns: "The great gatsby is a novel". Title Case is standard for English book titles and headlines; Sentence case is the modern convention for UI labels and headings (Google's Material Design, Apple's HIG, and most product design systems all prefer it).

Why does the converter lowercase everything before re-casing?

To produce consistent output regardless of input casing. If you paste `XML_HTTP_REQUEST` and convert to camelCase, you want `xmlHttpRequest`, not `XMLHTTPRequest`. The tokenizer first identifies word boundaries, then casing is reapplied. The trade-off is that proper noun casing inside the input is lost — feed it "John's Book" and the output is "johnsBook", not "JohnsBook".

How do digits inside identifiers behave?

Digits stick to the preceding lowercase letters and become a token boundary against any following uppercase letter. `utf8String` tokenizes as `utf8`, `string`. `parse2DPoint` becomes `parse2`, `d`, `point`. This matches the convention used by most major linters; if you need different behavior, paste the string in pre-tokenized (with spaces) for full control.

Is anything stored or sent to a server?

No. The tokenizer and all 10 conversions are pure JavaScript functions running in your browser tab. No network requests, no logging, no analytics on input content.