The same phrase can be written in at least eight different cases, and choosing the right one is not just style: it is what makes a heading read cleanly, a variable name compile, and a URL rank. The Best Answer Hub Case Converter switches text between all eight in one click, entirely in your browser, with nothing uploaded, so you can match the case to the job without retyping a thing.
Most people know upper and lower case. The interesting choices are the ones in between: title versus sentence case for writing, and the family of programming cases (camelCase, snake_case, kebab-case) for code and the web. This guide covers when to use each, and the surprising ways case conversion goes wrong.
The eight text cases at a glance
Here is the same input written in every case the tool produces. The four on the left are for reading; the four on the right are for code and the web. The infographic below shows them side by side, and the table names where each one belongs.
Case names per MDN glossary (camel case, snake case, kebab case). The Best Answer Hub Case Converter outputs all eight.
| Case | Example | Where it belongs |
|---|---|---|
| UPPERCASE | HELLO WORLD | Acronyms, short emphasis, not body text |
| lowercase | hello world | Casual text, tags, some brand styling |
| Title Case | Hello World | Formal titles, headings, product names |
| Sentence case | Hello world | Headlines, UI labels, subject lines |
| camelCase | helloWorld | Variables and functions in JavaScript |
| PascalCase | HelloWorld | Class names and components |
| snake_case | hello_world | Python code, database columns |
| kebab-case | hello-world | URLs, CSS classes, HTML attributes |
Title case or sentence case: which should you use?
Use title case for formal titles and sentence case for almost everything else. Title case capitalizes the major words, like "The Quick Brown Fox," and suits book and film titles, product names, and formal headings. Sentence case capitalizes only the first word and any proper nouns, like "The quick brown fox," and it has become the default for headlines and interface text because it reads more naturally and is harder to get wrong. Government and product style guides now say so outright: the GOV.UK Design System instructs teams to "write all headings in sentence case" (GOV.UK).
Title case itself is not one rule but several, which is why two tools can capitalize the same title differently. The split is over small words. The Chicago Manual of Style lowercases all prepositions no matter how long, so it keeps "with" lowercase (Chicago), while AP style capitalizes prepositions and conjunctions once they reach four letters, so it writes "With." One rule holds across every guide: the first and last word of a title are always capitalized, whatever they are.
Short verbs are always capitalized in a title. Words like "Is," "Are," "Be," and "It" look small, so people lowercase them, but only articles, short prepositions, and coordinating conjunctions drop to lowercase. "What It Is" is correct; "What it is" is not, in title case.
Which case should you use for code?
In programming, case is not decoration, it is convention, and each language has one. Python official style, PEP 8, says function and variable names "should be lowercase, with words separated by underscores," which is snake_case, while class names "should normally use the CapWords convention," which is PascalCase (PEP 8). JavaScript goes the other way for variables: MDN guidance is to "use camel case, starting with a lowercase character," and PascalCase for classes (MDN). Constants are conventionally all caps with underscores. Following the convention is what makes code readable to the next person, and in some linters, valid at all.
| Context | Convention | Example |
|---|---|---|
| Python functions and variables | snake_case | get_user_profile |
| Python and other class names | PascalCase | UserProfile |
| JavaScript variables and functions | camelCase | getUserProfile |
| Constants | UPPER with underscores | MAX_RETRIES |
| CSS classes and URLs | kebab-case | get-user-profile |
Is snake_case or kebab-case better for URLs?
For URLs and CSS, kebab-case wins, and for a concrete reason. Search engines and the web platform treat a hyphen as a word separator but an underscore as a joiner, so get-user-profile reads as three words while get_user_profile can read as one. Google has long advised using hyphens rather than underscores in URLs for exactly this reason, and MDN documents kebab-case as the convention for CSS custom properties and class names (MDN). Save snake_case for Python and database work, where the underscore is at home.
Case is a signal, not decoration. The right one tells a reader you are formal, or tells a compiler you meant a class, or tells Google where the words break.
Why is converting case trickier than it looks?
Because letters do not always map one-to-one. The clearest example is the German eszett: the lowercase sharp s uppercases to "SS," two letters, so uppercasing a word can actually change its length (Unicode). Case can also be language-dependent. In Turkish, a lowercase "i" uppercases to a dotted capital and an uppercase "I" lowercases to a dotless one, so a naive English-style conversion is simply wrong for Turkish text. This is why JavaScript offers locale-aware methods, toLocaleUpperCase and toLocaleLowerCase, alongside the plain ones, and MDN notes the results differ "for some locales, such as Turkish" (MDN).
Two more traps are worth knowing. There is no single correct title case, because the rules are style-specific and no programming language ships a built-in toTitleCase, so every converter has to pick a convention. And brand names with deliberate casing, like iPhone, macOS, or eBay, will be flattened by any automatic tool, so restore those by hand after converting. A last, softer point: long passages set in all capitals are harder to read for most people, which W3C accessibility material advises against for body text (W3C WAI), so keep uppercase for short emphasis, not paragraphs.
Is it private to convert text online?
It is when the tool runs on your device, and that is worth checking for anything sensitive. Converting case is trivial, but the text itself may not be: an unpublished headline, a client name, a snippet of code. Many online converters send whatever you paste to a server, which hands that text to a third party for no good reason. The safer habit mirrors what regulators advise about data you do not need to share: the FTC tells organizations not to collect sensitive information they have no need for (FTC).
The Best Answer Hub Case Converter runs entirely in your browser using local JavaScript string methods, so your text never leaves the page. There is no upload, no account, and nothing stored. It is a small tool, but the principle holds: if the work can happen on your own machine, there is no reason to send the words anywhere.
Convert text between all eight cases, free
Paste your text, click a format, and copy the result. Title, sentence, camelCase, snake_case, and more, all in your browser with nothing uploaded.
Open the Case ConverterCommon questions about text case
Keep going
- →Free Career & Resume Tools The whole Career Toolkit explained, from resumes to writing helpers, all in your browser.
- →Writing to a Word or Character Limit The counts that matter, from X to the Common App, counted privately.
- →Free Developer Tools, Nothing Uploaded The Developer Toolbox, from JSON to Base64, all client-side.
- →SMB AI Readiness Score A free assessment with an instant radar and quick wins.
Sources
- MDN Web Docs, Camel case, Snake case, and Kebab case (definitions).
- Python, PEP 8, Naming Conventions (snake_case for functions and variables, CapWords for classes, all caps for constants).
- MDN Web Docs, JavaScript code style guide (camelCase for variables and functions, PascalCase for classes).
- The Chicago Manual of Style, Capitalization of titles (lowercase prepositions regardless of length).
- GOV.UK Design System, Headings (write all headings in sentence case).
- Unicode Consortium, Case Mappings FAQ (eszett uppercases to SS; Turkish dotted and dotless i).
- MDN Web Docs, String.toLocaleUpperCase() (locale-aware case, differs for Turkish).
- W3C WAI, Capitalization (all-capital text is harder to read; working-group material).
- FTC, Protecting Personal Information: A Guide for Business (do not collect sensitive data you do not need).
Jump into the tools: Case Converter, Word Counter, and the Career Toolkit.