Case Converter

Convert any text to camelCase, PascalCase, snake_case, kebab-case, SCREAMING_SNAKE_CASE, and 8 more naming conventions — all at once, instantly. Auto-detects your input format. Everything runs in your browser.

How It Works

  1. 1

    Paste or type any text — variable names, sentences, or identifiers in any existing format

  2. 2

    The tool auto-detects the input format and converts to all 13 case styles simultaneously

  3. 3

    Click Copy next to any variant to copy that specific format to your clipboard

When To Use This Tool

  • When converting an API response in snake_case to camelCase for JavaScript

  • When renaming variables consistently across a codebase to match a new naming convention

  • When writing CSS class names (kebab-case), SQL columns (snake_case), and JavaScript variables (camelCase) in one workflow

  • When you need SCREAMING_SNAKE_CASE for environment variable names or constants

  • When converting a blog title to a URL slug (kebab-case)

Frequently Asked Questions

Complete Guide to Naming Conventions and Case Styles

Why naming conventions matter

Naming conventions are enforced (or expected) by language communities, linters, and style guides. Using the wrong convention does not break code — but it makes it look foreign to native speakers of that language. Python expects snake_case for functions; JavaScript expects camelCase; CSS expects kebab-case. In a codebase that mixes conventions without reason, readers spend cognitive energy decoding intent instead of understanding logic. Most style guides are authoritative: PEP 8 for Python, Google Java Style Guide, and Airbnb JavaScript Style Guide all specify case conventions explicitly.

Programming case conventions by language

JavaScript/TypeScript: camelCase for variables and functions, PascalCase for classes and components, SCREAMING_SNAKE_CASE for constants. Python: snake_case for everything (PEP 8), SCREAMING_SNAKE_CASE for module-level constants, PascalCase for classes. Java: camelCase for methods and variables, PascalCase for classes, SCREAMING_SNAKE_CASE for constants. Go: camelCase for unexported names, PascalCase for exported names. Rust: snake_case for functions and variables, PascalCase for types and enums, SCREAMING_SNAKE_CASE for constants. CSS: kebab-case for all class names and custom properties.

URL slugs and SEO

URLs use kebab-case by convention: /blog/my-post-title not /blog/my_post_title or /blog/myPostTitle. Google recommends hyphens over underscores in URLs — Google treats hyphens as word separators but historically treated underscores as part of a word. Lowercase is required: URLs are case-sensitive on most servers. A good slug is short, descriptive, and uses real words rather than abbreviations. This tool's kebab-case output is a good starting point for URL slugs.

Environment variables and configuration

Environment variables used in .env files, Docker, Kubernetes, and CI/CD universally use SCREAMING_SNAKE_CASE: DATABASE_URL, API_KEY, NODE_ENV. This convention comes from Unix shell, where variable names are case-sensitive and uppercase names are used for environment and shell variables. Configuration libraries like Spring Boot use a relaxed binding that accepts kebab-case, snake_case, or camelCase as aliases for the same property — but the canonical form in application.properties uses dot.case (spring.datasource.url).

Database column naming

SQL is case-insensitive for identifiers in most databases, but convention matters for readability. PostgreSQL: unquoted identifiers are lowercased internally; snake_case is the idiomatic convention (user_id, created_at). MySQL: similar, snake_case is standard. SQL Server: traditionally uses PascalCase or camelCase. ORM frameworks (Django, SQLAlchemy, ActiveRecord) typically use snake_case for database columns and convert automatically to camelCase for the application model. Always be consistent within a project — mixed naming in schema columns causes confusion when writing queries.

Handling acronyms in naming conventions

Acronyms like URL, HTTP, XML, and ID create ambiguity in case conversions. Two schools of thought exist. Google/Go style: treat the acronym as a regular word — URL becomes Url in PascalCase (getUrl instead of getURL). This makes string operations predictable. Microsoft/.NET style: keep acronyms uppercase — URL stays URL in PascalCase (GetURL). Two-letter acronyms (ID, OK) are usually all-caps. This tool splits consecutive uppercase runs at the transition back to lowercase — XMLParser becomes xmlParser in camelCase.

Case conversion in code

Most languages have utilities for case conversion. JavaScript: no built-in, but lodash provides _.camelCase(), _.snakeCase(), _.kebabCase(). Python: str.lower(), str.upper(), and re.sub() for structural cases; the humps and inflect libraries provide full conversion. Ruby: ActiveSupport provides underscore, camelize, dasherize, and classify. Go: strings package handles basic transforms; golang.org/x/text/cases provides Unicode-aware title casing. For structural cases like camelCase and snake_case, manual implementation or a dedicated library is required in most languages.

Was this tool helpful?

Related Tools

This free case converter supports all 13 naming conventions: camelCase, PascalCase, snake_case, SCREAMING_SNAKE_CASE, kebab-case, COBOL-CASE, dot.case, Title Case, Sentence case, UPPERCASE, lowercase, tOGGLE cASE, and aLtErNaTiNg CaSe. Auto-detects input format. Converts instantly in your browser.

This tool runs entirely in your browser. Your text never leaves your device.