Case Converter
Convert text between different casing styles. Runs entirely in your browser.
Text Case Styles in Programming — When and Where to Use Each Naming Convention
Consistent naming conventions are a cornerstone of clean, maintainable code. Different programming languages, frameworks, and contexts have established conventions for how identifiers (variables, functions, classes, constants) should be cased. Using the wrong convention makes code harder to read and violates linting rules.
Programming Case Styles Reference
- camelCase — First word lowercase, subsequent words capitalized. Used for JavaScript/TypeScript variables and functions, Java methods, JSON property names. Example:
getUserProfile,isActive. - PascalCase — Every word capitalized. Used for class names in most languages, React/Vue/Angular components, C# methods and properties, TypeScript interfaces. Example:
UserProfile,HttpClient. - snake_case — Words separated by underscores, all lowercase. Used for Python variables and functions, Ruby methods, database column names, PostgreSQL/MySQL conventions. Example:
user_profile,created_at. - kebab-case — Words separated by hyphens, all lowercase. Used for CSS class names, URL slugs, HTML attributes, npm package names, CLI flags. Example:
user-profile,font-size. - CONSTANT_CASE — All uppercase with underscores. Used for environment variables, constants, enum values, preprocessor macros. Example:
MAX_RETRIES,API_BASE_URL. - UPPER CASE — All characters uppercase. Used for acronyms, headings, and emphasis.
- lower case — All characters lowercase. General-purpose text normalization.
- Title Case — First letter of each word capitalized. Used for headings, titles, and UI labels.
When to Convert Between Case Styles
- API integration — Convert between camelCase (JavaScript) and snake_case (Python/database) when mapping JSON payloads to database schemas
- Code refactoring — Rename variables or files to match your project's linting rules (ESLint, Pylint, RuboCop)
- URL slug generation — Convert titles to kebab-case for SEO-friendly URLs
- Database migration — Convert column names between conventions when switching ORMs or databases
Frequently Asked Questions
The converter detects word boundaries using spaces, underscores, hyphens, and camelCase transitions (where a lowercase letter is followed by an uppercase letter). This means you can paste text in any format — camelCase, snake_case, kebab-case, or plain sentences — and convert it to any other style accurately.
No. All case conversions run entirely in your browser using JavaScript. Your text never leaves your device — no data is transmitted to any server. This makes it safe for converting proprietary code, variable names, and sensitive content.
This tool supports UPPER CASE, lower case, Title Case, Sentence case, camelCase, PascalCase, snake_case, kebab-case, and CONSTANT_CASE. These cover the naming conventions used in JavaScript, Python, Ruby, CSS, URLs, database columns, and environment variables.
Yes. A common use case is converting Python snake_case variables to JavaScript camelCase, or converting CSS kebab-case class names to PascalCase for React components. Paste your variable name and click the target case style to convert it instantly.
The converter preserves non-ASCII characters and only transforms letter casing. Special characters like numbers, punctuation, and emoji remain unchanged. For snake_case and kebab-case, non-alphanumeric characters are treated as word separators.