Uppercase Text Converter — Convert Text to ALL CAPS or Title Case
Converting text to uppercase, lowercase, or title case is a common need for headings, constants, and formatting. Here's how to use an uppercase converter online and convert...
Converting text to uppercase, lowercase, or title case is quick with the right tool. Whether you’re formatting headings, generating constants, or processing user input, here’s how to do it online and in code.
Use the Case Converter to instantly convert any text to uppercase, lowercase, title case, and more.
Online text case conversion
The Case Converter tool handles all common text case transformations:
- UPPERCASE — ALL CAPS:
HELLO WORLD - lowercase — all small:
hello world - Title Case — First Letter Of Each Word:
Hello World - Sentence case — First letter only:
Hello world - camelCase —
helloWorld - PascalCase —
HelloWorld - snake_case —
hello_world - kebab-case —
hello-world
JavaScript uppercase and lowercase
// Built-in methods:
'Hello World'.toUpperCase(); // 'HELLO WORLD'
'Hello World'.toLowerCase(); // 'hello world'
// First letter uppercase (sentence case):
function sentenceCase(str) {
if (!str) return str;
return str.charAt(0).toUpperCase() + str.slice(1).toLowerCase();
}
sentenceCase('hello world'); // 'Hello world'
sentenceCase('HELLO WORLD'); // 'Hello world'
// Title case:
function titleCase(str) {
return str.replace(/\b\w/g, c => c.toUpperCase());
}
titleCase('hello world'); // 'Hello World'
// Toggle case (swap upper ↔ lower):
function toggleCase(str) {
return str.split('').map(c =>
c === c.toUpperCase() ? c.toLowerCase() : c.toUpperCase()
).join('');
}
toggleCase('Hello World'); // 'hELLO wORLD'
Python case methods
text = "Hello World"
text.upper() # 'HELLO WORLD'
text.lower() # 'hello world'
text.title() # 'Hello World'
text.capitalize() # 'Hello world' (only first char)
text.swapcase() # 'hELLO wORLD'
# Check case:
'HELLO'.isupper() # True
'hello'.islower() # True
'Hello World'.istitle() # True
# Locale-aware (Python 3.3+):
'istanbul'.upper() # 'ISTANBUL' (works for ASCII)
# For proper Unicode handling:
'ß'.upper() # 'SS' (German sharp S)
CSS uppercase without changing the HTML
CSS text-transform changes display case without modifying the actual text:
/* CSS-only case transformation: */
.uppercase { text-transform: uppercase; }
.lowercase { text-transform: lowercase; }
.capitalize { text-transform: capitalize; } /* Title Case */
/* Examples: */
.heading {
text-transform: uppercase;
letter-spacing: 0.1em; /* common pairing for ALL CAPS headings */
}
.label {
text-transform: uppercase;
font-size: 0.75rem;
font-weight: 600;
}
This is better than storing text in uppercase in your database — you can change the style without changing the data.
When to use each case
| Context | Recommended case |
|---|---|
| CSS class names | kebab-case |
| JS variables | camelCase |
| Python variables | snake_case |
| Constants | UPPER_SNAKE_CASE |
| Classes/types | PascalCase |
| Headings (display) | Title Case or ALL CAPS via CSS |
| URLs | kebab-case |
| SQL columns | snake_case |
Bulk text case conversion
For converting many strings at once:
const items = ['hello world', 'user profile', 'get data'];
// Convert all to camelCase:
const camelCased = items.map(str =>
str.replace(/\s+(.)/g, (_, c) => c.toUpperCase())
);
// ['helloWorld', 'userProfile', 'getData']
// Convert all to UPPER_SNAKE_CASE (constants):
const constants = items.map(str =>
str.replace(/\s+/g, '_').toUpperCase()
);
// ['HELLO_WORLD', 'USER_PROFILE', 'GET_DATA']
Related tools
- Case Converter — convert text between all naming conventions
- Title Case Converter — title case rules
- JavaScript String Case — string manipulation in JS
Related posts
- camelCase — What It Is and Where to Use It in Programming — camelCase capitalizes the first letter of each word except the first: helloWorld…
- camelCase vs snake_case — Which Naming Convention to Use and When — camelCase and snake_case are the two dominant naming conventions in programming.…
- Kebab Case — What It Is and Where to Use kebab-case — Kebab case uses hyphens between lowercase words: hello-world, user-first-name. I…
- String Case Conversion in JavaScript — toUpperCase, toLowerCase, and More — JavaScript has built-in methods for uppercase and lowercase conversion, but conv…
- Title Case Converter — Convert Text to Title Case Online — Title case capitalizes the first letter of most words in a title. Different styl…
Related tool
Convert text between camelCase, PascalCase, snake_case, kebab-case, SCREAMING_CASE, Title Case, sentence case, and more. Bulk mode.
Written by Mian Ali Khalid. Part of the Dev Productivity pillar.