Case Converter: Convert Text to camelCase, snake_case, Title Case and More
Convert text between UPPERCASE, lowercase, Title Case, camelCase, PascalCase, snake_case, and kebab-case instantly online.
Try the free online tool
Runs entirely in your browser — no signup, no uploads.
Consistent text casing is a cornerstone of clean code, readable documentation, and professional writing. Developers switch between camelCase for JavaScript variables, snake_case for Python functions, PascalCase for class names, and kebab-case for CSS properties dozens of times a day. Writers toggle between Title Case for headings, UPPERCASE for acronyms, and sentence case for body text. Doing this manually invites mistakes.
This Case Converter transforms any text into any of seven standard casing formats with a single click. It handles word boundaries correctly even in edge cases — consecutive capitals (like 'HTMLParser'), numbers embedded in words, and mixed-case input are all parsed and recased accurately. The tool is especially useful for renaming identifiers when refactoring code or reformatting database column names imported from a legacy system.
This guide explains each casing format, when to use it, and how the conversion algorithm handles tricky inputs like acronyms, numbers, and punctuation.
What Are Text Casing Formats?
Text casing formats are conventions for how words in a multi-word string are capitalized and separated. Different programming languages and style guides have adopted different conventions, each with a specific purpose.
camelCase starts with a lowercase letter and capitalizes the first letter of each subsequent word, with no separator. It is the default in JavaScript, Java, and Swift for variable and method names. PascalCase is similar but capitalizes the first letter too, making it the convention for class names in many object-oriented languages.
snake_case uses lowercase letters with underscores as word separators. It is standard in Python, Ruby, and database column names. kebab-case replaces underscores with hyphens and is ubiquitous in CSS class names, HTML attributes, and URL slugs. SCREAMING_SNAKE_CASE (all caps snake_case) is the convention for constants in most languages.
How to Use This Tool
Converting text case is a two-step operation:
- 1
Paste or type your text
Enter the text you want to convert. It can be in any current casing format — the tool detects word boundaries from existing spaces, underscores, hyphens, or capital letters.
- 2
Select the target case
Click one of the case buttons: UPPER CASE, lower case, Title Case, Sentence case, camelCase, PascalCase, snake_case, kebab-case, or SCREAMING_SNAKE_CASE.
- 3
Review the output
The converted text appears instantly. Check that word boundaries were detected correctly — particularly for acronyms like 'HTML' that may be split differently across tools.
- 4
Copy the result
Click Copy to copy the converted text to your clipboard. The original input is preserved so you can convert the same text to multiple formats without re-pasting.
- 5
Convert multiple lines at once
For multi-line input, each line is converted independently. This is useful for batch-converting a list of variable names or column headers.
Common Use Cases
Case conversion is used constantly in software development and content creation:
- Refactoring code: convert a list of database column names from snake_case to camelCase for a JavaScript API response object.
- CSS authoring: convert component names from PascalCase (React component names) to kebab-case (CSS class names).
- Heading formatting: convert a draft heading in ALL CAPS to Title Case for publication.
- API response normalization: convert JSON keys from one naming convention to another when integrating third-party APIs.
- README and documentation: ensure consistent casing for technical terms across a long documentation file.
Tips and Best Practices
Get consistent, accurate case conversions with these guidelines:
- Verify acronym handling: tools differ in how they handle acronyms. 'XMLParser' might convert to 'xml_parser' or 'x_m_l_parser' depending on the algorithm. Check the output and adjust if needed.
- Use sentence case for UI copy: button labels, error messages, and form field labels should use sentence case (only the first word capitalized) in modern UI design.
- Use Title Case consistently for headings: apply the same Title Case rules throughout a document. Most style guides capitalize all words except short prepositions, articles, and conjunctions.
- Batch-convert with multi-line input: paste a list of identifiers (one per line) to convert all of them in one step rather than converting each one individually.
- Test the output in your IDE: after converting variable or function names, paste them into your code editor and check for lint errors to confirm the casing is correct for your language.
Frequently Asked Questions
What is the difference between camelCase and PascalCase?
camelCase starts with a lowercase letter (e.g., 'myVariableName') while PascalCase starts with an uppercase letter (e.g., 'MyVariableName'). PascalCase is also called UpperCamelCase. camelCase is used for variables and functions; PascalCase is used for class and component names.
How does the tool detect word boundaries in mixed-case input?
The tool splits on whitespace, underscores, hyphens, and transitions from a lowercase letter to an uppercase letter (e.g., 'camelCase' splits into 'camel' and 'Case'). Consecutive uppercase letters like 'HTML' are treated as a single word.
What is SCREAMING_SNAKE_CASE used for?
SCREAMING_SNAKE_CASE (all uppercase with underscores) is the conventional format for constants and environment variables in most programming languages, for example: 'MAX_RETRY_COUNT' or 'DATABASE_URL'.
Does the tool work with non-English text?
The tool correctly handles uppercase and lowercase conversions for Unicode characters in European languages (including accented characters). For languages without a concept of case (like Chinese or Arabic), the output is unchanged.
Can I convert multiple words or lines at once?
Yes. Multi-line input is processed line by line, converting each line independently. This allows batch conversion of lists of identifiers, column names, or headings.
What is the difference between sentence case and title case?
Sentence case capitalizes only the first word and proper nouns (like normal prose). Title case capitalizes the first letter of most words, following style-guide rules about which short words (like 'and', 'the') remain lowercase.
How does the tool handle numbers in identifiers?
Numbers are treated as word separators in some modes. For example, 'h1Heading' may be split into 'h', '1', and 'Heading' depending on the mode. Review the output when identifiers include numbers and adjust manually if needed.
Ready to use this tool?
Free, instant, no account required. Runs entirely in your browser.