Case Converter — UPPER, lower, camelCase, snake_case & More
Convert text to UPPERCASE, lowercase, Title Case, camelCase, PascalCase, snake_case, kebab-case, or CONST_CASE in real time.
About Case Converter — UPPER, lower, camelCase, snake_case & More
Case Converter transforms text between 8 formats in real time — UPPER, lower, Title, camelCase, PascalCase, snake_case, kebab-case, CONST_CASE. Multi-line text is converted line by line. Copy the result instantly.
How to Use
- 1Paste your text into the left input area.
- 2Click a format tab — UPPER, camelCase, snake_case, etc.
- 3The converted text appears on the right instantly. Click "Copy" to copy it.
Features
- Real-time conversion — results appear as you type
- 8 case formats covering all common naming conventions
- Multi-line text converted line by line
- Runs entirely in your browser — no upload required
Case Conventions in Programming
Different programming languages and ecosystems have established naming conventions that developers are expected to follow. Using the correct case format improves code readability and signals familiarity with the ecosystem.
camelCase and PascalCase
camelCase (e.g. myVariableName) is the standard for variable and function names in JavaScript, Java, and Swift. The first letter is lowercase and each subsequent word starts with uppercase. PascalCase (e.g. MyClassName) capitalizes every word including the first, and is used for class names in most object-oriented languages — JavaScript, TypeScript, C#, Java, and PHP all follow this convention for class definitions. Mixing up the two is a common source of naming inconsistencies in codebases.
snake_case and kebab-case
snake_case (e.g. user_first_name) uses underscores as word separators and is the dominant convention in Python for variables and functions, Ruby, and SQL column names. Database schemas almost universally use snake_case for table and column identifiers. kebab-case (e.g. my-component-name) uses hyphens and is the standard for CSS class names, HTML attributes, and URL path segments. File names for web assets (images, scripts, stylesheets) are also conventionally kebab-case in most frontend projects.
CONST_CASE for Constants
CONST_CASE (also called SCREAMING_SNAKE_CASE, e.g. MAX_RETRY_COUNT) is used for constants and environment variable names across most languages. In JavaScript and TypeScript, top-level const declarations that hold fixed configuration values are written in CONST_CASE. In Python, module-level constants follow the same convention per PEP 8. Environment variables in .env files and CI/CD pipelines are always CONST_CASE (e.g. DATABASE_URL, API_SECRET_KEY), making this format essential for DevOps and configuration management.
Case Conversion in Practice
Beyond writing new code, case conversion is a frequent data-transformation task when integrating systems, processing API responses, or generating content programmatically.
Renaming API Response Fields
REST APIs and databases often return data in snake_case (e.g. first_name, created_at), while JavaScript frontend code expects camelCase (firstName, createdAt). When consuming third-party APIs or migrating between stacks, you may need to bulk-rename dozens of field names. This case converter lets you paste a list of snake_case field names and convert them all to camelCase at once, then use the results in your interface layer or data mapper.
Normalizing User Input
Form inputs and user-generated content arrive in inconsistent case formats. A title typed as "my AWESOME product NAME" needs to become "My Awesome Product Name" for display, or "my-awesome-product-name" for a URL. Converting user input to a consistent case before storing it prevents duplicates in databases, ensures consistent display across pages, and simplifies search and filtering logic. Run user-submitted labels, tags, and category names through a case converter before persisting them.
Slug Generation from Titles
Blog post titles, product names, and page headings need to be converted to URL-safe kebab-case slugs for use in routes and permalinks. A title like "10 Best Practices for REST APIs" becomes "10-best-practices-for-rest-apis". This conversion involves lowercasing, replacing spaces and special characters with hyphens, and removing punctuation — all of which the kebab-case conversion mode handles automatically. Combine with the Text to Slug tool for full accented-character normalization.
FAQ
- What is the difference between camelCase and PascalCase?
- camelCase starts with a lowercase letter (e.g. myVariable). PascalCase capitalizes every word including the first (e.g. MyVariable).
- Can I convert a full paragraph?
- Yes. Each line is converted independently, so full paragraphs work correctly.
- How does it handle snake_case or kebab-case input?
- Underscores and hyphens are treated as word separators before applying the target format.
- What is the difference between snake_case and kebab-case?
- snake_case uses underscores as word separators (my_variable_name) and is standard in Python, Ruby, and database column names. kebab-case uses hyphens (my-variable-name) and is used in CSS class names, HTML attributes, and URL slugs. JavaScript uses camelCase for variables, while CSS uses kebab-case for property names.
- Which case format should I use for CSS class names?
- CSS class names use kebab-case by convention (e.g., main-navigation, hero-section). JavaScript variables use camelCase, Python variables use snake_case, and constants use UPPER_SNAKE_CASE. Choosing a consistent convention across your codebase is more important than which one you choose.
Found a bug or something not working as expected?
Report a bug →