Text Case Converter
Type or paste your text in the input field. All case conversions appear instantly below — click Copy next to any format to copy it to your clipboard.
UPPERCASE
HELLO WORLD EXAMPLE TEXT
lowercase
hello world example text
Title Case
Hello World Example Text
Sentence case
Hello world example text
camelCase
helloWorldExampleText
PascalCase
HelloWorldExampleText
snake_case
hello_world_example_text
kebab-case
hello-world-example-text
SCREAMING_SNAKE_CASE
HELLO_WORLD_EXAMPLE_TEXT
What Is Text Case?
Text case refers to how the letters in a text are capitalized. Different programming languages, writing styles, documentation formats, and style guides have specific conventions about which case to use. Converting between them quickly can save significant time for developers, writers, and content creators.
Supported Case Formats
| Case Type | Example | Common Uses |
|---|---|---|
| UPPERCASE | HELLO WORLD | Acronyms, headings, emphasis |
| lowercase | hello world | CSS class names, URLs, general text |
| Title Case | Hello World | Article titles, book titles, headings |
| Sentence case | Hello world | Normal prose, UI labels |
| camelCase | helloWorld | JavaScript/TypeScript variables, Java |
| PascalCase | HelloWorld | Class names in most languages, React components |
| snake_case | hello_world | Python variables, database column names, file names |
| kebab-case | hello-world | CSS classes, HTML attributes, URLs, npm packages |
| SCREAMING_SNAKE_CASE | HELLO_WORLD | Constants in most programming languages |
Programming Language Conventions
Each major programming language has its own case conventions:
| Language | Variables | Functions | Classes | Constants |
|---|---|---|---|---|
| JavaScript / TypeScript | camelCase | camelCase | PascalCase | SCREAMING_SNAKE |
| Python | snake_case | snake_case | PascalCase | SCREAMING_SNAKE |
| Java / Kotlin | camelCase | camelCase | PascalCase | SCREAMING_SNAKE |
| Go | camelCase | camelCase / PascalCase | PascalCase | SCREAMING_SNAKE |
| Ruby | snake_case | snake_case | PascalCase | SCREAMING_SNAKE |
| Rust | snake_case | snake_case | PascalCase | SCREAMING_SNAKE |
| PHP | camelCase | camelCase | PascalCase | SCREAMING_SNAKE |
| CSS / HTML | kebab-case | kebab-case | — | — |
Title Case Rules
Title case in English has nuanced rules that go beyond simply capitalizing every word. Style guides differ on which words to capitalize:
Always capitalize:
- The first and last word of the title
- Nouns, verbs, adjectives, adverbs, pronouns
- Words of four or more letters
Usually do not capitalize (unless first or last word):
- Articles: a, an, the
- Short prepositions: at, by, for, in, of, on, to, up
- Coordinating conjunctions: and, but, for, nor, or, so, yet
This converter uses a simplified rule that capitalizes the first letter of every word, which is sufficient for most use cases.
Use Cases for Case Conversion
For developers:
- Renaming variables when switching between languages
- Converting database column names to JavaScript property names
- Generating code from data structures
For content creators:
- Formatting blog post and article titles
- Preparing headings for SEO-optimized content
- Fixing improperly cased imported text
For data processing:
- Normalizing user input for database storage
- Standardizing CSV column headers
- Cleaning scraped web data
Frequently Asked Questions
What is the difference between camelCase and PascalCase?
camelCase starts with a lowercase letter (helloWorld) while PascalCase starts with an uppercase letter (HelloWorld). Both have the first letter of each subsequent word capitalized. camelCase is common for variables and functions, while PascalCase is standard for class names.
What is SCREAMING_SNAKE_CASE used for?
SCREAMING_SNAKE_CASE (all capitals with underscores) is the universal convention for constants and environment variables in most programming languages. Examples: MAX_RETRY_COUNT, DATABASE_URL, API_KEY.
Why does Python use snake_case instead of camelCase?
Python's PEP 8 style guide explicitly recommends snake_case for variable and function names. The Python community considers snake_case more readable because the underscores provide clear visual separation between words, while camelCase relies on case differences that can be harder to see in long names.
What is kebab-case?
Kebab-case uses hyphens as separators (hello-world), resembling items on a kebab skewer. It is the standard for CSS class names, HTML attributes, URL slugs, and npm package names. It cannot be used for programming variables because the hyphen is interpreted as a minus operator.
How do I handle special characters and numbers in case conversion?
This converter treats numbers and most special characters as word separators. Spaces, underscores, and hyphens are used as delimiters when splitting words. Numbers are preserved in their original position within each word.
Related Tools
- Roman Numeral Converter — Convert between Arabic and Roman numerals
- Base Converter — Convert between binary, decimal, hex, and octal
- QR Generator — Generate QR codes from any text
- Percentage Calculator — Quick percentage calculations
- Date Calculator — Calculate durations and add days to dates
Sources
- Python PEP 8: Style Guide for Python Code
- Google JavaScript Style Guide: Naming Conventions
- Mozilla Developer Network: CSS Naming Conventions