Case Converter

Case Converter

Convert any string to 11 naming conventions at once — camelCase, PascalCase, snake_case, kebab-case, and more. Plus a JSON-keys batch mode that recursively rewrites every key. All in your browser.

Case Converter — TL;DR

Convert any string to 11 naming conventions at once — camelCase, PascalCase, snake_case, kebab-case, and more. Plus a JSON-keys batch mode that recursively rewrites every key. All in your browser.

They're all ways to write multi-word identifiers (or filenames, URLs, CSS classes) without spaces. camelCase capitalises every word after the first (`userFirstName`), used in JavaScript, Java, Swift. snake_case lower-cases everything and joins with underscores (`user_first_name`), used in Python, Ruby, SQL. kebab-case uses hyphens (`user-first-name`), used in CSS, HTML, URL slugs, command-line flags. PascalCase is camelCase with the first letter capitalised too (`UserFirstName`), used for class / type names in many languages.

The tokeniser uses two boundary rules: lower-to-upper (`a` followed by `B` = split) and caps-then-Title (a run of capitals followed by a lowercase letter splits before the last capital). So `XMLHttpRequest` becomes `[XML, Http, Request]` → `xml_http_request` / `xmlHttpRequest` / `XmlHttpRequest`. `userIDToken` becomes `[user, ID, Token]` → `user_id_token`. This matches what most language style guides recommend.

Identifiers and JSON never leave your device. Open DevTools → Network and you'll see zero outbound requests during conversion or copy.

Eleven naming conventions, one paste

From classic camelCase / snake_case to dot.case / path/case — plus a JSON-keys batch mode for renaming every key in a nested object.

11 case styles, all at once

camelCase, PascalCase, snake_case, CONSTANT_CASE, kebab-case, COBOL-CASE, dot.case, path/case, Title Case, Sentence case, UPPERCASE, lowercase. Paste once, see every output instantly.

Smart tokenisation

Splits identifiers correctly across all input styles — `XMLHttpRequest` → `xml_http_request`, `userIDToken` → `user_id_token`. Handles acronyms, digits, and mixed separators (_, -, ., /) without confusion.

JSON-keys batch mode

Paste a nested JSON object and rewrite every key in your chosen style — recursively. Optionally convert string values too. Preserves arrays, types, and structure.

One-click copy

Each output row has its own copy button — click and the value is in your clipboard. Visual confirmation; no toast spam.

Privacy by design

Every conversion runs in JavaScript on your device. No identifiers, no JSON, no clipboard activity is ever transmitted. Open DevTools → Network and verify zero outbound requests.

Tiny + fast

Pure JavaScript, no framework runtime. Cold load is under 25 KB gzipped. All 11 conversions for any string finish in under 1 ms.

How to use the converter

Two modes — single-string and JSON-keys batch.

  1. 1

    Pick the mode

    Single string for one identifier or phrase — type / paste once, see all 11 case outputs. JSON keys (batch) when you need to convert every key in a nested API response or config file.

  2. 2

    Paste your input

    Single-string mode accepts any input — `userFirstName`, `user_first_name`, `user-first-name`, `USER FIRST NAME`, even `XMLHttpRequest`. The tokeniser splits it correctly and re-joins for every output style. JSON mode accepts any valid JSON object — the depth doesn't matter.

  3. 3

    Pick a target style

    In single-string mode, all 11 outputs appear at once — pick whichever you need. In JSON mode, choose one target case from the dropdown; every key in the object is rewritten in that style.

  4. 4

    Copy and paste

    Click the copy icon next to any output row to send to the clipboard. For JSON output, copy the whole result block — drop straight into your codebase or API client.

Built for code reviews, refactors, and API plumbing

Four common scenarios where pasting once and getting every style beats fingerless renaming.

Backend ↔ Frontend boundary

Backend gives you `user_first_name`; frontend wants `userFirstName`. Paste, copy, paste — done. Use the JSON batch mode to convert every key in a sample API response in one step (then write the codegen template based on the result).

Refactoring across languages

Porting a Python library to JavaScript? Take the Python source's snake_case identifiers and run them through camelCase output. Drop the result into your JS port. The smart tokeniser handles `__double_underscore` and trailing digits without breaking.

ENV vars ↔ runtime config

Convert a `MY_AWESOME_FEATURE_FLAG` (env var convention) to `myAwesomeFeatureFlag` (JS variable) or `my_awesome_feature_flag` (Python). The CONSTANT_CASE / camelCase / snake_case round-trip is exact.

CSS / file naming

BEM expects kebab-case: `.user-card__avatar--large`. Got a JS variable name from a designer (`userCardAvatarLarge`)? Convert in one step. Useful for Tailwind utilities, npm package names, URL slugs, and CLI flag names — all of which prefer kebab-case.

100% private — runs in your browser

Identifiers and JSON never leave your device. Open DevTools → Network and you'll see zero outbound requests during conversion or copy.

  • All tokenisation, case conversion, and JSON traversal runs as JavaScript on your machine — visible in the page source.
  • Clipboard writes use the standard navigator.clipboard.writeText API; nothing is logged.
  • No login, no telemetry on identifier values, no third-party API. We only use one cookie for cookie-consent state and one for language preference.

Related guides

Hand-picked reads on naming conventions, API design, and refactoring.

Frequently asked

What's the difference between camelCase, snake_case, and kebab-case?

They're all ways to write multi-word identifiers (or filenames, URLs, CSS classes) without spaces. camelCase capitalises every word after the first (`userFirstName`), used in JavaScript, Java, Swift. snake_case lower-cases everything and joins with underscores (`user_first_name`), used in Python, Ruby, SQL. kebab-case uses hyphens (`user-first-name`), used in CSS, HTML, URL slugs, command-line flags. PascalCase is camelCase with the first letter capitalised too (`UserFirstName`), used for class / type names in many languages.

How does the smart tokeniser handle acronyms?

The tokeniser uses two boundary rules: lower-to-upper (`a` followed by `B` = split) and caps-then-Title (a run of capitals followed by a lowercase letter splits before the last capital). So `XMLHttpRequest` becomes `[XML, Http, Request]` → `xml_http_request` / `xmlHttpRequest` / `XmlHttpRequest`. `userIDToken` becomes `[user, ID, Token]` → `user_id_token`. This matches what most language style guides recommend.

What does the JSON-keys batch mode do?

Paste a JSON object — even a deeply nested one — and pick a target case style. The tool walks the entire tree depth-first, converts every key (including keys inside arrays), and outputs the rebuilt JSON. Arrays, types (number / boolean / null), and structure are preserved exactly. Toggle "Also convert string values" to additionally rewrite every string-valued field's contents through the same tokeniser.

Which convention should I use for my project?

Follow the dominant convention of your language first, then your team second. Default to: camelCase for JS / Java / Swift / Kotlin / Go (exported names use PascalCase), snake_case for Python / Ruby / Rust / SQL columns, kebab-case for CSS classes / HTML attributes / URL paths / npm packages / CLI flags, SCREAMING_SNAKE_CASE for environment variables and language constants. When converting between layers (snake_case API → camelCase frontend), pick a single boundary and keep the rest of the system consistent.

Is anything sent to your server?

No. Tokenisation, every conversion, and the JSON-keys batch mode all run as JavaScript in your browser. Open DevTools → Network and you'll see zero outbound requests during use. We use one cookie for cookie-consent state and one for language preference, that's it.