Text formatting is essential for both program code structure (camelCase, snake_case) and grammatical typography (Sentence Case, Title Case). This guide covers the formatting structures and when to apply them.
Supported Capitalization Cases
| Case Format | Example Output | Primary Industry / Use Case |
|---|---|---|
| camelCase | myVariableCase | JavaScript, TypeScript, and Java variable styling |
| snake_case | my_variable_case | Python variables, databases, and JSON API payloads |
| kebab-case | my-variable-case | CSS classes, URL slugs, and HTML attributes |
| Title Case | My Variable Case | Blog article headings, book titles, and menus |
| Sentence case | My variable case | Normal text paragraphs and prose descriptions |
When to use kebab-case for URL Slugs
Search engines split words in URLs via hyphens. Using kebab-case (e.g., 'seo-optimization-tips') signals word bounds, whereas underscores or spaces cause encoding bloat (e.g., '%20') or parsing anomalies.
Our text tool has a built-in copy helper. You can format code fields and click 'Copy' to copy variable names immediately.
Format Your Text Instantly
Swap case formats, count characters, and strip formatting tabs using our secure client-side text editor.