Skip to main content
UtilityStack

Text Case Converter — 12 cases at once

Type or paste any text, see it converted into every common case at the same time. Click Copy on any line to grab that variant. Useful for code naming and content cleanup.

  • UPPERCASEHELLO WORLD — CONVERT ME!
  • lowercasehello world — convert me!
  • Title CaseHello World — Convert Me!
  • Sentence caseHello world — convert me!
  • camelCasehelloWorldConvertMe
  • PascalCaseHelloWorldConvertMe
  • snake_casehello_world_convert_me
  • kebab-casehello-world-convert-me
  • CONSTANT_CASEHELLO_WORLD_CONVERT_ME
  • dot.casehello.world.convert.me
  • path/casehello/world/convert/me
  • iNVERSE cASEhELLO wORLD — CONVERT ME!

Twelve cases, one paste

Identifiers in code follow conventions per language and ecosystem: JavaScript variables are camelCase, Python is snake_case, CSS classes are kebab-case, environment variables are CONSTANT_CASE, file paths are path/case. When you're moving content between systems — say, a column header from a spreadsheet into a database schema — you constantly need to flip cases.

This converter detects word boundaries even in cases where there are no spaces (camelCase, PascalCase) and rebuilds the input in twelve common formats. The detection is conservative: 'XMLHttpRequest' becomes 'xml_http_request' (treating the consecutive capitals as a unit), which matches what most code generators produce.

How to use this tool

  1. Type or paste your text into the textarea. Sample text is preloaded so you can see how each case behaves.
  2. Read down the list to find the case you need. The labels match the names you'd see in lint rules, programming language guides, and CSS conventions.
  3. Click Copy on the row you want to put that variant on your clipboard. The detection handles spaces, hyphens, underscores, and embedded camelCase as word separators.

Frequently asked questions

Which case should I use in my code?

It's language-driven. JavaScript and Java use camelCase for variables and PascalCase for types/classes. Python and Ruby use snake_case for variables. CSS classes are kebab-case. Constants in any language are usually CONSTANT_CASE. URL slugs are kebab-case.

How does the converter handle 'XMLHttpRequest'?

It treats consecutive capitals as a single token, so XMLHttpRequest splits into ['XML', 'Http', 'Request']. snake_case → xml_http_request, kebab-case → xml-http-request. This matches the behaviour of most lint tools and code generators.

What's the difference between Title Case and Sentence case?

Title Case capitalises every word ('The Quick Brown Fox'). Sentence case capitalises only the first word and after sentence-ending punctuation ('The quick brown fox.'). Title is for headings and titles; Sentence for body content and shorter labels.

Are my texts private?

Yes. Conversion happens entirely in your browser. Nothing is sent to a server, so the tool is safe even with proprietary code, internal docs, or sensitive content.

Can I round-trip safely between cases?

Mostly, but not always. snake_case → camelCase → snake_case is reversible. UPPER → snake_case loses information about which sequences were originally underscored vs separate words. When in doubt, start from a 'natural' form (sentence case) and convert outward.

Common use cases

Where flipping cases turns a manual chore into one click.

Renaming variables across languages

Pull a list of fields from a Python API (snake_case) and feed them into a TypeScript client (camelCase). Paste the list, copy the camelCase column, you're done.

Generating CSS classes from copy

Designer hands you 'Primary CTA Button' as a layer name. Convert to kebab-case → 'primary-cta-button' → drop into your CSS file as the class name.

Building env-var keys

Take a config field name from your code (apiBaseUrl, sessionTimeoutMs) and convert to CONSTANT_CASE for the .env file (API_BASE_URL, SESSION_TIMEOUT_MS).

URL slug generation

Title 'Why React Server Components Matter' → kebab-case 'why-react-server-components-matter' → straight into your blog's URL slug field.

Tips and shortcuts

Habits that keep naming consistent across a codebase.

Pick one case per layer

Variables and functions: one case (camelCase or snake_case). Types and classes: one case (PascalCase). Files: one case (kebab-case). Database columns: snake_case. Mixing within a layer makes lint rules useless.

Configure your linter

ESLint, Pylint, Rubocop and most language linters can enforce naming conventions automatically. Generate the right case once with this tool, then let the linter keep it consistent forever.

URL slugs go in kebab-case

Search engines treat dashes as word separators in URLs but underscores as part of the same word. Always use kebab-case for slugs, never snake_case — Google reads my-blog-post but not my_blog_post.

Don't over-abbreviate constants

API_KEY is fine. AKY is not — your future self in three months won't remember what it stood for. The cost of an extra five characters is far less than the cost of a confusing constant name.

Ähnliche Tools