Text Case Converter (camelCase, snake_case)
Convert text to UPPERCASE/lowercase, title case, camelCase, snake_case, kebab-case and URL slug.
How it works
Enter text and it is shown at the same time in ten styles: uppercase and lowercase, title case, sentence case, camelCase, PascalCase, snake_case, kebab-case, CONSTANT_CASE and a URL-friendly slug. Press Copy on the variant you need. Everything happens locally in your browser.
About this tool
The text case tool converts text between UPPERCASE, lowercase, Sentence case, Title Case, camelCase, PascalCase, snake_case, kebab-case, CONSTANT_CASE and Sponge cAsE. Handy for tidying variable names in code, changing a heading to Title Case for publishing, converting column names from a database, or just cleaning up text where someone TYPED IN ALL CAPS throughout. Everything happens in the browser, no data is sent to the server, and it correctly handles Norwegian æ, ø, å, Swedish ä, ö, German ü, ß and Romance-language accents.
How to use it
- Paste or type your text in the input field.
- Click the button for the case you want (e.g. Title Case).
- Copy the result from the output field.
- Use the "swap" arrow to convert the result further.
Examples
the quick brown fox jumps over the lazy dogThe Quick Brown Fox Jumps Over the Lazy Doguser first nameuserFirstNameHTTP Request Methodhttp_request_methodCommon use cases
- Standardise variable names during code refactoring.
- Convert column names in CSV exports from a database.
- Prepare headlines for publishing on a blog or news site.
- Fix messages from users who wrote with caps lock stuck on.
- Generate URL slugs (kebab-case) from article titles.
Frequently asked questions
- What’s the difference between camelCase and PascalCase?
- camelCase starts with a lowercase letter (myVariable), PascalCase with an uppercase letter (MyVariable). The convention is often camelCase for variables and functions, PascalCase for classes and types.
- What is kebab-case used for?
- URL slugs (kebab-case is URL-friendly), CSS classes, HTML attributes (data-user-id) and filenames on many systems. Hyphens are more readable in URLs than underscores or camelCase.
- Are æ, ø, å handled correctly?
- Yes. We use Unicode-correct case conversion via JavaScript String.prototype.toLocaleUpperCase() and toLocaleLowerCase() with a language tag. Æ → æ, Ø → ø, Å → å, ß → SS (per German rule), and Turkish dotless i/I is also handled correctly with lang: "tr".
- Can I convert a whole block of text?
- Yes, with no upper limit on text volume. The tool handles hundreds of pages easily since conversion is local in the browser.
Technical background
Upper and lower case in Unicode is not simply A ↔ a. The standard defines "uppercase", "lowercase" and "titlecase" as separate operations with tables spanning 1400+ characters. Edge cases: German ß → SS on upper (newer Unicode also has ẞ), Turkish i has a dotless variant (ı) and I has a dotted form (İ), Greek sigma has different lowercase depending on word position (σ mid, ς end). JavaScript’s toUpperCase() and toLowerCase() use locale-independent rules that fail for Turkish, while toLocaleUpperCase('tr') does it right. The tool’s case transforms build on Intl-locale handling plus a simple tokenizer for identifier cases (camelCase splits at capitals, snake_case at underscores, kebab-case at hyphens). English Title Case follows AP Stylebook: first and last words always capitalised, articles (a, an, the), prepositions under four letters (in, on, at, of, to) and conjunctions (and, but, or) lowercase in the middle. Norwegian only capitalises the first word plus proper nouns, unlike English.