Skip to main content
L
Loopaloo
Buy Us a Coffee
All ToolsImage ProcessingAudio ProcessingVideo ProcessingDocument & TextPDF ToolsCSV & Data AnalysisConverters & EncodersWeb ToolsMath & ScienceGames
Guides & BlogAboutContact
Buy Us a Coffee
L
Loopaloo

Free online tools for developers, designers, and content creators. Your files are processed in your browser and are never uploaded - no accounts required. A few network utilities (like What's My IP and Currency Converter) call public APIs to do their job and say so on their pages.

support@loopaloo.com

Tool Categories

  • Image Tools
  • Audio Tools
  • Video Tools
  • Document & Text
  • PDF Tools
  • CSV & Data
  • Converters
  • Web Tools
  • Math & Science
  • Games

Company

  • About Us
  • Contact
  • Blog
  • FAQ

Legal

  • Privacy Policy
  • Terms of Service
  • Disclaimer

Support

Buy Us a Coffee

© 2026 Loopaloo. All rights reserved. Built with privacy in mind.

Privacy|Terms|Disclaimer
  1. Home
  2. Document & Text
  3. Text Case Converter
Add to favorites

Text Case Converter

Convert text between 17 cases with every rule stated: punctuation is a separator, acronyms survive, accents survive a URL slug, and Title Case follows a style you name (Chicago, AP or APA) rather than an unattributed word list

Text processed locallyMore document & textJump to full guide

Related reading

  • Keyboard Shortcuts Every Developer Should Know9 min read
  • Text Case Conversion: camelCase, snake_case, and Beyond11 min read

Initializing in your browser…

You might also like

Audio Format Converter

Convert between MP3, WAV, OGG, AAC, M4A and FLAC with a bitrate, sample rate, channel count and bit depth that all reach the encoder, and a panel that reports what was actually written.

Image Text Extractor (OCR)

Read text off a picture with Tesseract, after preparation that measures the type and enlarges it: 8px text went from a 53 percent character error rate to 8. Every word carries a confidence and a box drawn on the picture.

Text Diff & Compare Tool

Compare texts with side-by-side and unified diff views, line-by-line or character-level comparison, change statistics, and export to patch file

Text Case Converter: a worked example

A spreadsheet column has product names in random casing and you need consistent Title Case plus a snake_case variant for a database import.

Input

First Name (US) v2
What Text Case Converter produces

Converted forms

snake_case:   first_name_us_v2
camelCase:    firstNameUsV2
CONSTANT:     FIRST_NAME_US_V2
url-slug:     first-name-us-v2
Title Case:   First Name (US) V2

One input with everything that is easy to get wrong in it: a bracket, an acronym and a digit after a letter. Punctuation is a separator and is removed, which is what an identifier convention means: the version this replaced kept it and produced first_name_(us)_v2. A digit before a capital is a word boundary, so col2Name is two words rather than col2name. An acronym survives Title Case, so US does not become Us. And a URL slug keeps accented letters rather than deleting them, so Cafe Munster with its accents stays cafe-munster rather than becoming caf-mnster. Every example printed under a style name is computed from this input under the settings in force, so it cannot drift from what the tool does.

What this converter does

Switch text between uppercase, lowercase, Title Case, camelCase, snake_case, kebab-case, and more. Handy when you need to match a naming convention without retyping everything.

How it works

Seventeen case styles, and the hard part of every one of them is deciding where a word ends.

The rules are the five `src/lib/csv/naming.ts` states, reused here rather than restated: anything that is not a letter, a digit or a combining mark is a separator and is removed; a lower case letter followed by an upper case one starts a new word; in a run of capitals the last one before a lower case letter starts a new word, so XMLParser splits as XML then Parser; a digit followed by a capital starts a new word, so col2Name is two; and a letter next to a digit is not a boundary, so version2 is one.

The version this replaced got the two capital rules right and everything else wrong. Only a dash, an underscore, a dot and a slash were separators, so every other character stayed exactly where it was: `First Name (US)` came out of snake_case as `first_name_(us)` and `Price ($)` as `price_($)`, neither of which is snake_case. It had no digit rule, so `col2Name` became `col2name`. Measured against a 22 input corpus on 2026-09-03: 278 of 352 conversions were correct; after this pass, 352 of 352, through the browser.

Four other things changed. The URL slug used `[^\w\s-]` to strip punctuation, and `\w` is `[A-Za-z0-9_]`, so it deleted every accented letter along with its accent: `Café Münster` became `caf-mnster` and a Japanese place name vanished entirely. Accented letters are kept now, which RFC 3987 allows in a URL, and there is an ASCII option that removes the accent FROM the letter, giving `cafe-munster`. Alternating and inverse case ran over UTF-16 code units, so an emoji counted as two positions and the alternation after it was one out; they run over grapheme clusters now. Sentence case capitalised after every full stop, so `dr. smith arrived` became `Dr. Smith arrived`; it uses the sentence rule from the Word Counter now, which knows an abbreviation, an initial and a decimal point from the end of a sentence. And random case called `Math.random` during render, so the value changed every time the component redrew; it is seeded on the text now, so the same text gives the same answer.

Title case is the one that has no single answer, and the version this replaced hid that behind an unattributed list of eighteen small words. There are three published rules and they disagree: the Chicago Manual of Style (17th edition, 8.159) lowercases every preposition however long, so it writes "A Portrait of the Artist between the Wars"; the AP Stylebook capitalises any word of four letters or more, so it writes "Between"; APA follows AP and adds the word after a colon. All three are offered, the one in force is named on the page with its source, and the words it keeps lower case can be expanded and read. A word that is already all capitals is left alone, so US does not become Us, unless the whole text is capitals and there is no way to tell an acronym from a shout.

Every example printed under a style name is computed from the same input, `First Name (US) v2`, under the settings in force, so it always shows what that style will actually do rather than a string typed next to it that might have drifted.

How to use

  1. 1Type or paste your text into the input field
  2. 2Click the desired case format button
  3. 3Copy the converted result to your clipboard

Key features

  • Supports 12 case formats including camelCase, PascalCase, and CONSTANT_CASE
  • Instant conversion as you click
  • One-click copy to clipboard

When to reach for this

  • Adapting variable names across languages

    Convert camelCase JavaScript variables to snake_case for Python or CONSTANT_CASE for environment configs without manual rewriting.

  • Formatting headings consistently

    Quickly shift between Title Case and sentence case when standardizing document or blog headings.

Tips & best practices

  • Paste an identifier that is already cased and it will be read correctly: existing camelCase humps, the _ - . / delimiters, a run of capitals before a word, and a digit before a capital are all boundaries, so getHTTPResponseCode goes straight to snake_case.
  • A conversion to an identifier style is lossy on purpose: snake_case lowercases, so HTTP becomes http and there is no way back. Converting to Title Case and back will not restore it.
  • Title Case is a style, not a rule. Pick the one whatever you are writing for uses, and read the list of small words it keeps lower case before trusting the result on a title full of prepositions.
  • The url-slug keeps accented letters by default, which every modern browser handles and shows back as the letters. Turn on the ASCII option only when the thing reading the URL cannot, and note that it removes the accent from the letter rather than the letter itself.
  • Random case is seeded on the text, so the same text always gives the same answer. That is the difference from the version this replaced, which produced a new pattern every time the page redrew.

Examples

  • Acronym handling and lossy round-trip

    Input 'XMLHttpRequest' is tokenized as 'XML Http Request' by the acronym boundary rule, giving snake_case 'xml_http_request' and CONSTANT_CASE 'XML_HTTP_REQUEST'. Note the original mixed-acronym capitalization is not recoverable: converting that snake_case back to PascalCase yields 'XmlHttpRequest', not the original.

  • Title Case minor-word skipping

    Input 'the lord of the rings' becomes 'The Lord of the Rings' in Title Case - 'of' and the inner 'the' stay lowercase because they are in the 18-word minor list, while the leading 'the' is capitalized because it is the first word.

  • Deterministic vs random styles

    For 'hello', aLtErNaTiNg always returns 'hElLo' (even indices lower, odd upper). RaNdOm CaSe returns a different mix such as 'hELlo' or 'HeLLo' on each render because it calls Math.random() per character.

Frequently asked questions

What is the difference between camelCase and PascalCase?

camelCase starts with a lowercase letter (myVariable), while PascalCase capitalizes the first letter too (MyVariable). Both capitalize subsequent words.

Which case format should I use for CSS class names?

kebab-case is the standard convention for CSS class names, since hyphens are valid in CSS selectors and improve readability.

Further reading

  • Keyboard Shortcuts Every Developer Should Know9 min read
  • Text Case Conversion: camelCase, snake_case, and Beyond11 min read

Private by design

Your text is processed locally in the browser. Nothing you paste or open is transmitted or logged.