Case Converter
Convert text between uppercase, lowercase, title case, sentence case, camelCase, PascalCase, snake_case, kebab-case, and CONSTANT_CASE instantly.
Last updated: March 25, 2026
Find this tool useful? Support the project to keep it free!
Buy me a coffeeWhat is Case Converter?
Text case conventions are naming rules that define how words are capitalized or delimited in identifiers, headlines, file names, and programming constructs. Each programming language, ecosystem, and context has a dominant convention: Python variables use `snake_case`; JavaScript uses `camelCase` for variables and `PascalCase` for classes; CSS class names use `kebab-case`; environment variables use `CONSTANT_CASE`; database column names use `snake_case`; URL slugs use `kebab-case`; editorial headlines use `Title Case`.
Converting between cases manually is tedious and error-prone — especially for multi-word names where you need to split on spaces, camelCase humps, or underscores before re-joining in a new format. This tool handles the full split-transform-join pipeline: you paste any text (regardless of its current case) and click the target case to instantly get the correctly formatted output. All 9 common cases are supported: UPPERCASE, lowercase, Title Case, Sentence case, camelCase, PascalCase, snake_case, kebab-case, and CONSTANT_CASE.
How to Use Case Converter
Paste or type your text in the input field — it can be in any current case (space-separated, camelCase, snake_case, etc.)
Click any case button to convert: UPPERCASE, lowercase, Title Case, Sentence case, camelCase, PascalCase, snake_case, kebab-case, CONSTANT_CASE
The output updates instantly — view the result in the output panel below the buttons
Click "Copy" to copy the converted text to your clipboard
Keep clicking different case buttons to explore how the same text looks in each convention
Common Use Cases
- Converting a space-separated product name ("User Profile Settings") to camelCase for JavaScript variable: userProfileSettings
- Transforming a Python snake_case function name ("get_user_profile") to a React component PascalCase: GetUserProfile
- Converting a blog post title to kebab-case for a URL slug: "how-to-use-typescript" from "How to Use TypeScript"
- Uppercasing variable names to CONSTANT_CASE for environment variables and .env files: DATABASE_CONNECTION_STRING
- Converting a database column name (user_created_at) to camelCase for a JSON API response field: userCreatedAt
- Normalizing inconsistently capitalized user input (all-caps, mixed) to sentence case for storage
- Converting a CSS class name (`.main-navigation-bar`) to a JavaScript object key in camelCase: mainNavigationBar
- Generating file names conforming to project naming conventions: from component name to kebab-case file path
Example Input and Output
Converting "user profile settings" to all 9 case conventions:
user profile settingsUPPERCASE: USER PROFILE SETTINGS
lowercase: user profile settings
Title Case: User Profile Settings
Sentence case: User profile settings
camelCase: userProfileSettings
PascalCase: UserProfileSettings
snake_case: user_profile_settings
kebab-case: user-profile-settings
CONSTANT_CASE: USER_PROFILE_SETTINGSHow This Tool Works
Input text is first tokenized into an array of words by (1) splitting for space-separated words, (2) splitting on underscore or hyphen delimiters for snake_case/kebab-case, and (3) splitting camelCase/PascalCase on uppercase letter boundaries using a regex (/[A-Z]?[a-z]+|[A-Z]+(?=[A-Z]|$)/g). All words are then lowercased to normalize. The target case transformation is applied: for camelCase, the first word stays lowercase and subsequent words are capitalized; for snake_case, words are joined by underscores in lowercase; etc. The transformed word array is joined and returned.
Technical Stack
Client-Side Processing
All case conversion runs in your browser. Text is never sent to our servers.
Case Conversion in Code
For programmatic case conversion in code: JavaScript/TypeScript: use the lodash utility library (_.camelCase(), _.kebabCase(), _.snakeCase(), _.startCase()) or the change-case npm package (camelCase, pascalCase, snakeCase, kebabCase, constantCase). Python: use str.lower(), str.upper(), str.title() for basic cases; the inflection library for snake_case/camelCase conversions. These libraries handle edge cases like acronyms (HTMLParser → html_parser → htmlParser) more reliably than hand-rolled regex.
CSS Naming Conventions
CSS class names use kebab-case by universal convention (.main-nav, .hero-section, .card-grid) because CSS property names themselves use kebab-case (font-size, background-color, border-radius). BEM (Block Element Modifier) methodology extends this: .block__element--modifier pattern (.card__title--featured). CSS Modules and CSS-in-JS tools (styled-components, Emotion) often bridge the gap — component props use camelCase in JavaScript but the generated CSS class names may use kebab-case or hashed names.
Frequently Asked Questions
What is camelCase vs PascalCase?
camelCase (lowerCamelCase): the first word is fully lowercase, subsequent words are capitalized — no separators: userProfileSettings, onClick, firstName. Uses: JavaScript/TypeScript variables, functions, and class properties; Java variables; JSON keys; React props. PascalCase (UpperCamelCase): every word including the first is capitalized: UserProfileSettings, OnClick, FirstName. Uses: TypeScript/Java class names; React component names; C# class and method names; .NET types. The "camel" in camelCase refers to the humped shape of the mid-capital letters.
When should I use snake_case vs kebab-case?
snake_case (words joined by underscores): Python variables, functions, and module names (pep8_style); Ruby variables and methods; database column names (user_created_at); GraphQL field names; file names in Python projects (my_module.py). kebab-case (words joined by hyphens): CSS class names (.main-navigation); HTML data attributes (data-user-id); URL slugs and route paths (/blog/my-article); npm package names (react-query); file names in JavaScript projects (user-profile.tsx). Note: kebab-case cannot be used for JS variable names — hyphens are subtraction operators.
What is Title Case and how does it differ from Sentence case?
Title Case: every major word is capitalized (nouns, verbs, adjectives, adverbs) while minor words (articles: a/an/the, short prepositions: in/of/at, conjunctions: and/but/or) stay lowercase unless they're the first or last word: "The Quick Brown Fox Jumps Over the Lazy Dog". Rules vary slightly between AP Style, Chicago Manual of Style, and APA. Sentence case: only the first word and proper nouns are capitalized — exactly as you'd write a sentence: "The quick brown fox jumps over the lazy dog". Blog post titles typically use Title Case; body text, button labels, and UI labels often use sentence case for more conversational tone.
What is CONSTANT_CASE and when is it used?
CONSTANT_CASE (SCREAMING_SNAKE_CASE): all letters uppercase, words separated by underscores: DATABASE_URL, MAX_RETRY_COUNT, API_KEY. Used for: environment variables (in .env files and shell scripts), compile-time constants in C/Java/C++ (#define MAX_BUFFER_SIZE 1024), globally scoped immutable values in JavaScript/TypeScript (const API_URL = ""), Python module-level constants (PEP 8 convention: MAX_CONNECTIONS = 100), and configuration keys in systems like AWS CloudFormation and Kubernetes ConfigMaps.
How does the converter handle text that is already in camelCase?
The converter first normalizes the input by splitting it into individual words regardless of the input case format. For camelCase/PascalCase input: it splits on uppercase letter boundaries (insertBefore → ["insert", "Before"]). For snake_case/kebab-case: it splits on underscores/hyphens. For space-separated text: it splits on spaces. After word extraction, it applies the target case transformation to the normalized word array. This means converting "userProfileSettings" (camelCase) to snake_case correctly produces "user_profile_settings".
Does this work with non-English characters and accented letters?
Basic uppercase/lowercase conversion works with most Unicode characters — JavaScript's String.prototype.toUpperCase() and toLowerCase() are Unicode-aware and handle: accented characters (é → É), German ß → (SS in uppercase), Greek letters, and most Latin-extended characters. However, programming cases (camelCase, snake_case, kebab-case) work best with ASCII text — the word-boundary detection logic splits on common separators and capital letters, which may not correctly identify word boundaries in non-Latin scripts (e.g., Arabic, Chinese, Japanese have no concept of letter case).
Related Tools
Word Counter
Count words, characters, sentences, paragraphs, and reading time — with keyword density analysis and platform-specific character limit indicators.
Slug Generator
Convert any text to a clean, SEO-friendly URL slug — handles special characters, accents, and spaces.
Readability Scorer
Analyze text readability using Flesch-Kincaid, Gunning Fog, and SMOG grades to ensure your writing is easy to understand.
Text Diff Checker
Compare two text blocks and see additions, deletions, and changes highlighted line-by-line using the Myers diff algorithm — like Git diff in a browser.
Lorem Ipsum Generator
Generate placeholder text for your designs and mockups — by paragraph, sentence, or word count, with classic or random variation.

