Skip to content

Case converter. Thirteen cases, live.

Type or paste in the box. Every case renders below, UPPERCASE, lowercase, Title, Sentence, camelCase, PascalCase, snake_case, CONSTANT_CASE, kebab-case, dot.case, aLtErNaTiNg, iNVERSE, reverse. Click any case to copy, or feed a result back in to chain conversions. Accented and non-Latin text works. Browser-only, your text stays on the page.

0 words · 0 characters
·

Privacy: text is processed in your browser. Nothing is sent or logged.

§ · written guide

How to use the Case Converter

This converter shows one piece of text in thirteen cases at once, from UPPERCASE and Title Case to camelCase, snake_case and kebab-case. It splits your text into words at spaces, punctuation and changes from lower to upper case, then joins the words back in each style. Every card updates as you type. It is for developers naming variables, files and URLs, and for writers fixing the case of headings.

Step by step

  1. Type or paste your text

    Enter text in the Your text box. The page opens with a short sample sentence in it. The counter beside the label shows the number of words and characters as you type.

  2. Find the case you need

    Scroll the cards below the box. Each card shows one case, such as camelCase, PascalCase, snake_case, CONSTANT_CASE, kebab-case or dot.case, with a short hint under it, such as where that case is usually used (Python, SQL for snake_case) or what it does (flip every char for iNVERSE cASE).

  3. Copy a result

    Click anywhere on a card to copy its text. The small click to copy label on the card changes to copied for a moment to confirm it worked.

  4. Chain conversions

    Press use as input on a card to put that result back in the box. Every other card then converts from it, which helps when you want, for example, a reversed version of the uppercase text.

  5. Reset the box

    Press clear to empty the box, or load sample to bring back the sample sentence.

Reading the result

  • The code style cases keep only letters and numbers. Typing XMLHttpRequest gives xml_http_request in snake_case, xml-http-request in kebab-case and XML_HTTP_REQUEST in CONSTANT_CASE, because a run of capitals followed by a capital and a lowercase letter is treated as its own word.
  • UPPERCASE, lowercase, Title Case and Sentence case keep your spaces and punctuation exactly where you typed them.
  • aLtErNaTiNg switches between lower and upper case on letters only, starting with lowercase. iNVERSE cASE flips the case of every letter, and reverse text writes the whole string backwards.
  • A card that reads (empty) has nothing to show yet, usually because the box is empty or holds only symbols.

Tips and common mistakes

  • Title Case capitalizes every word, including small ones like of and the, and lowercases the rest of each word, so NASA becomes Nasa. Fix names and acronyms by hand afterwards.
  • Sentence case lowercases everything except the first letter of each sentence, so proper nouns lose their capitals too.
  • For URL slugs, kebab-case is a quick answer, but it keeps accented letters. Use a slug tool if you need plain ASCII.
  • Accented and non Latin letters count as word characters, so text such as café menu becomes café_menu rather than losing the accent.

Privacy and limits

All conversions run in your browser. The text is not sent anywhere and is not saved, so closing the tab clears it. Clicking a card only writes the result to your own clipboard.

Back to the tool

§ 02 · which case for which job

Five conventions developers ship by.

camelCase. JavaScript / TypeScript variables and functions (getUserName, isLoggedIn). Java instance methods. Swift / Kotlin variables. The de-facto standard for the entire web platform, addEventListener, querySelector, every browser API uses it. Use it by default in any JS / TS / Java codebase unless the project's lint config says otherwise.

PascalCase. Classes, types, interfaces, React components (UserProfile, PaymentMethod). Go exported identifiers (the case literally controls export visibility). Rust types. The capital-first signals "this is a type, not an instance." React + TypeScript codebases distinguish components (PascalCase) from hooks (camelCase prefixed with use), both forms in the same file.

snake_case. Python variables and functions (PEP 8). Ruby variables. SQL columns and table names (the canonical case for relational DBs). Rust variables. C++ standard library. Pick this when the surrounding codebase is Python or SQL-heavy; pick something else otherwise.

CONSTANT_CASE. Environment variables (DATABASE_URL, STRIPE_SECRET_KEY). Compile-time constants in C / Java / JavaScript. The all-caps with underscores convention is universally readable as "this should not change at runtime." Used in .env files, Dockerfiles, GitHub Actions, every CI config in existence.

kebab-case. URL slugs (/about-us/, /blog/post-title/). CSS class names (btn-primary, text-large). HTML data attributes (data-user-id). Command-line flags (--no-cache, --max-old-space-size). The hyphen is URL-safe and reads naturally to humans scanning a URL. Google's URL structure guidance recommends hyphens over underscores in slugs.

§ 03 · when to use this

Four jobs this tool covers.

Job 1: Identifier renaming. Rename a variable or class that needs to flow through multiple cases, UI label is "User Profile," React component is UserProfile, CSS class is user-profile, env var is USER_PROFILE_KEY, DB column is user_profile. Type once, copy each.

Job 2: Slug generation from a title. Paste a blog title, kebab-case output is the URL slug. For more controlled slug behavior (max length, reserved characters, accent stripping), use our Slug Generator, case converter is the quick version.

Job 3: Refactor case across a codebase. Migrating a Python repo from camelCase to snake_case (or the inverse), or moving from snake to kebab in URL routes, preview the conversion of a representative identifier here, validate it reads correctly, then run a project-wide rename via your editor or sed.

Job 4: Title formatting. Convert manuscript headings between Title Case and Sentence case to match a publication's style guide. Most modern style guides have moved to Sentence case for headings (more humble, easier to read at scan-pace). Pair with our Title Case Converter for AP / Chicago strict mode.

§ 04 · questions

Six questions users ask.

When do I use camelCase vs PascalCase vs snake_case?

Convention varies by language and context. JavaScript / TypeScript use camelCase for variables and functions, PascalCase for classes and types. Python uses snake_case for variables and functions, PascalCase for classes. Go uses PascalCase for exported identifiers, camelCase for unexported. Rust uses snake_case for variables, PascalCase for types. SQL conventionally uses snake_case for column and table names. Match the surrounding codebase, not your preference, consistency is the value.

When do I use kebab-case?

URL slugs, CSS class names, HTML attributes, command-line flags. The hyphen is URL-safe (the period and underscore are not, in some contexts) and reads naturally to humans scanning a URL. Modern web frameworks default to kebab-case for routes (about-us, blog-posts) and CSS classes (text-large, btn-primary). For a slug-specific tool with reserved-character handling, see our Slug Generator.

What's CONSTANT_CASE for?

Environment variables, constants in many languages (especially C, Java, JavaScript), and immutable configuration values. The all-caps with underscores convention dates back to Fortran and has carried through every language since. By convention, anything in CONSTANT_CASE shouldn't change at runtime, it's a contract with the reader, not a language enforcement in most modern languages.

What does Title Case actually mean?

Capitalises the first letter of every word. Different style guides have different rules about which words to skip (Chicago Manual leaves articles, conjunctions, and prepositions of fewer than 5 letters lowercase; AP capitalises everything except a, the, and short conjunctions). We use the simpler all-words-capitalised variant, that's what most title-case tools default to, and most CMS title fields expect. Punctuation is preserved: commas, periods, and apostrophes stay exactly where you typed them. For strict AP / Chicago title casing, use our Title Case Converter.

Why is the input split into words first?

Every conversion needs to know where word boundaries are. We split on whitespace, dashes, dots, underscores, and case-change positions (the W in HelloWorld is treated as a word boundary). This means HelloWorld → hello-world / hello_world / hello.world all work. The split-and-rejoin approach also handles mixed input gracefully, paste 'helloWorld_some-thing.MORE' and every output is correctly normalised. The splitter is also Unicode-aware: accented and non-Latin letters count as word characters, so héllo-wörld keeps its accents in every output.

Is the text I paste sent anywhere?

No. All conversions happen in your browser. The text is never uploaded to Digital Heroes servers, never logged. The page is static HTML; the only network request is the initial page load. Safe for code identifiers, internal naming proposals, or anything else you'd not want to ship to a third party.

Published · Last updated .

Priya sent you a message Online now

Talk to a Developer Now

Share your name and email to reply.

Reply