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. All processing happens entirely in your browser - your files never leave your device. No uploads, no accounts, complete privacy.

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 12 cases: UPPERCASE, lowercase, Title Case, camelCase, PascalCase, snake_case, kebab-case, CONSTANT_CASE, dot.case, path/case, Sentence, and Alternating

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.

Text processed locallyMore document & textJump to full guide

Related reading

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

Initializing in your browser…

You might also like

Audio Format Converter

Convert audio files between WAV, MP3, OGG, AAC, M4A, FLAC formats online. Adjust bitrate and quality settings. Free browser-based conversion with no file uploads to servers.

Image Text Extractor (OCR)

Extract text from images using advanced OCR. Supports 18+ languages, page segmentation modes, confidence scores, and multi-format export.

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

wireless NOISE-cancelling headphones
Text Case Converter produces

Converted forms

Title Case:  Wireless Noise-Cancelling Headphones
camelCase:   wirelessNoiseCancellingHeadphones
snake_case:  wireless_noise_cancelling_headphones
CONSTANT:    WIRELESS_NOISE_CANCELLING_HEADPHONES

The tool tokenises on spaces, hyphens, and case boundaries, then re-emits in each convention, so it correctly keeps "Noise-Cancelling" as two words for code identifiers instead of mangling them. Doing this by hand across a list is exactly where inconsistent casing bugs enter a dataset.

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

The Text Case Converter transforms input across 17 case styles split into three groups in the UI: Basic (lowercase, UPPERCASE, Title Case, Sentence case, Capitalize Words), Programming (camelCase, PascalCase, snake_case, kebab-case, CONSTANT_CASE, dot.case, path/case, Header-Case) and Special (url-slug, iNVERT cASE, aLtErNaTiNg, RaNdOm CaSe). The hard part of any case converter is word-boundary detection, and this one uses a four-step tokenizer (called getWords in the code): it inserts a space between a lowercase-then-uppercase pair (so 'helloWorld' splits into 'hello World'), inserts a space at an acronym-to-word boundary using the pattern that matches a run of capitals followed by a capital+lowercase (so 'XMLParser' splits as 'XML Parser'), replaces any of the delimiters - _ . / with spaces, and finally splits on whitespace. All the programming styles (snake_case, kebab-case, dot.case, path/case, CONSTANT_CASE, camelCase, PascalCase, Header-Case) are built by re-joining those detected words with the appropriate separator.

Because the tokenizer lowercases each word before re-joining for most programming styles (word.toLowerCase() for snake/kebab/dot/path, word.toUpperCase() for CONSTANT, and char-0-uppercase for camel/Pascal/Header), conversions are deliberately destructive to original capitalization: an input acronym like HTTP survives the split as its own word but is flattened to 'http' in snake_case or 'Http' in PascalCase. This makes round-trips lossy - going to Title Case and back to camelCase will not restore an original ALL-CAPS acronym. The boundary rules are also where ambiguity shows up: 'IOError' is split via the acronym rule into 'IO Error', but a single-letter prefix or trailing digits follow the literal regex, not English intuition. Title Case is the one style that does NOT use the word tokenizer - it splits on plain spaces, lowercases everything, then re-capitalizes, while skipping a hardcoded list of 18 minor words (a, an, and, as, at, but, by, for, in, nor, of, on, or, so, the, to, up, yet) unless they are the first word. Sentence case capitalizes only the first letter and any letter following . ! or ?, and url-slug lowercases, strips every character outside word/space/hyphen, collapses runs of spaces and hyphens, and trims leading/trailing hyphens.

The two random styles behave differently and it matters: aLtErNaTiNg is deterministic by character index (even positions lowercase, odd positions uppercase via i % 2), while RaNdOm CaSe calls Math.random() per character, so it produces a different result on every keystroke and is not reproducible. The tool runs entirely in the browser with no network calls. A Trim checkbox strips leading/trailing whitespace before conversion; a file picker accepts .txt, .md, .json and .csv and loads the contents into the input via FileReader; each result can be copied or downloaded as a converted-{caseType}-{timestamp}.txt plain-text Blob. Every copy action also pushes an entry into an in-memory history that keeps the last 10 conversions with a Restore button, and the input plus view settings are encoded in the URL via the shareable-config button, so a specific input and selected case can be linked directly. A live counter reports character, word and line counts on the input.

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

  • For correct programming-case output from already-cased identifiers, rely on the tokenizer's boundary rules: existing camelCase humps, _ - . / delimiters and acronym-to-word transitions are all detected, so you can paste 'getHTTPResponseCode' and get snake_case directly.
  • If you need a reproducible scrambled output, use aLtErNaTiNg (index-based) rather than RaNdOm CaSe, which re-randomizes on every keystroke via Math.random().
  • Use url-slug for URLs/filenames since it removes punctuation and collapses hyphens; it differs from kebab-case, which only re-joins detected words and keeps no punctuation-stripping guarantee.
  • Acronym capitalization is lost on conversion, so do not rely on Title Case -> camelCase round-trips to preserve names like 'IBM' or 'HTTP'.

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 Know10 min read
  • Text Case Conversion: camelCase, snake_case, and Beyond12 min read

Private by design

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