Text Case Converter
Convert text between Sentence case, Title Case, lowercase, UPPERCASE, camelCase, PascalCase, snake_case, kebab-case, and CONSTANT_CASE instantly.
126 chars · 18 words · 1 lines
124 chars · 1 words · 1 lines
PressEnterto convert instantly
- Local ProcessingYour text stays entirely inside your browser with zero network transmission or cloud logging.
- Multiple Case StylesConvert seamlessly between writing standards (Sentence, Title) and programming conventions (camelCase, snake_case).
- Instant TransformationSwitch between case styles or chain conversions with 'To Input' without re-entering your source text.
Knowledge Base
Understanding Text Case Formats
Different programming languages, API protocols, and publishing standards rely on specific casing conventions to improve readability and prevent naming collisions.
Transformation at a Glance
See how the same phrase ("hello tool porta") maps into modern naming styles:
UPPERCASEHELLO TOOL PORTA
Title CaseHello Tool Porta
camelCasehelloToolPorta
PascalCaseHelloToolPorta
snake_casehello_tool_porta
kebab-casehello-tool-porta
Case Styles & Typical Uses
| Case Style | Example | Typical Use Case |
|---|---|---|
| Sentence case | Hello tool porta | Normal prose, UI descriptions, sentences |
| Title Case | Hello Tool Porta | Article headlines, book titles, UI headers |
| camelCase | helloToolPorta | JavaScript / TypeScript variables and functions |
| PascalCase | HelloToolPorta | Classes, React components, TypeScript types |
| snake_case | hello_tool_porta | Python variables, database column names |
| kebab-case | hello-tool-porta | URLs, CSS class names, HTML attributes |
| CONSTANT_CASE | HELLO_TOOL_PORTA | Global constants, environment variables, enum keys |
Developer Quickstart
Case Conversion Implementation Snippets
Reference patterns for converting casing styles across popular programming languages.
// Basic snake_case converter
function toSnakeCase(text) {
return text
.trim()
.replace(/([a-z])([A-Z])/g, "$1_$2")
.replace(/[\s\-]+/g, "_")
.toLowerCase();
}
// Basic camelCase converter
function toCamelCase(text) {
return text
.trim()
.replace(/[-_\s]+(.)?/g, (_, c) => (c ? c.toUpperCase() : ""))
.replace(/^(.)/, (c) => c.toLowerCase());
}
console.log(toSnakeCase("helloWorldExample")); // "hello_world_example"
console.log(toCamelCase("hello-world_example")); // "helloWorldExample"FAQ
Frequently Asked Questions
Sentence case capitalizes only the first word of each sentence and proper nouns/acronyms. Title Case capitalizes the principal words while keeping minor grammatical words (like 'of', 'and', 'the') in lowercase.
Both formats concatenate words without spaces and capitalize the first letter of each subsequent word. However, camelCase begins with a lowercase letter (e.g. userProfile), whereas PascalCase begins with an uppercase letter (e.g. UserProfile).
Use snake_case (words separated by underscores) in languages like Python, Ruby, and for SQL database identifiers. Use kebab-case (words separated by hyphens) for web URLs, CSS class selectors, and filenames.
In writing-oriented modes (Sentence case, Title Case, lowercase, UPPERCASE), original punctuation is preserved intact. In programming identifier modes (camelCase, snake_case, etc.), punctuation marks act as word delimiters and are replaced by the appropriate casing separator.
Yes. By default, the 'Preserve line breaks' option ensures each line is converted independently, allowing you to format multi-line lists, code declarations, or CSV columns seamlessly.
Never. All parsing, tokenization, and string conversions run 100% locally in your browser memory.