XConvert
Downloads
Pricing

Online Text Case Converter

Paste your text and instantly switch between common writing and programming case styles with one click.

Words: 0Characters: 0

How to Convert Text Case Online

  1. Paste Your Text: Drop a word, a sentence, or thousands of lines into the "Your Text" box. Line breaks and paragraph structure are preserved, so the output mirrors the layout of your input. A live "Words" and "Characters" counter updates as you type.
  2. Pick a Case Format: Choose from nine one-click formats — UPPERCASE, lowercase, Title Case, Sentence case, camelCase, PascalCase, snake_case, kebab-case, or CONSTANT_CASE. Each format previews the result so you can compare options before copying.
  3. Review the Output (Optional): Spot-check edge cases — acronyms like HTML or URL, hyphenated names, numbers next to letters (version2update), and lines that mix capitalization. Switch formats freely; the original input is never modified.
  4. Copy Text and Use It: Click "Copy Text" to grab the result as plain text — no hidden formatting, no Markdown, no smart quotes. Paste it straight into your editor, CMS, spreadsheet, terminal, or .env file.

Why Convert Text Case?

Case isn't decorative — it carries meaning. Programming languages reserve PascalCase for classes and camelCase for variables. URL slugs need kebab-case to stay readable and SEO-friendly. SQL columns use snake_case by convention; environment variables use CONSTANT_CASE. A title that's "perfect" in AP style breaks in Chicago style because the rules for capitalizing "to" and "as" differ. Manual rewriting is slow and bug-prone, and word processors only offer crude uppercase/lowercase toggles.

  • Refactor variable names across languages — converting get_user_data (Python/PEP 8) to getUserData (JavaScript) or GetUserData (C#/Go exported) is a constant chore when porting code or building polyglot services. Bulk conversion eliminates typos in 30-line column lists.
  • Generate URL slugs from headlines — "How to Convert Text Case Online" becomes how-to-convert-text-case-online for clean, lowercase, hyphen-separated URLs. Google's URL structure guidelines specifically recommend hyphens over underscores for word separation.
  • Standardize database columns and JSON keys — APIs often return created_at and user_id (snake_case), but JavaScript clients expect createdAt and userId (camelCase). Pasting a column list and flipping formats is faster than writing a transform.
  • Format headlines for AP, Chicago, or APA style — Title Case rules differ by style guide. AP capitalizes prepositions of 4+ letters ("With", "From"); Chicago lowercases all prepositions. Title Case here applies a consistent rule so you can review and tweak rather than start from scratch.
  • Define environment variables and constants — DATABASE_URL, STRIPE_SECRET_KEY, MAX_RETRY_COUNT — CONSTANT_CASE (also called SCREAMING_SNAKE_CASE) is the universal convention for env vars across Linux, macOS, Windows, Docker, and CI systems.
  • Fix accidental Caps Lock — paste the mistyped paragraph, click lowercase, then re-apply Sentence case. Two clicks beat retyping.

Case Format Cheat Sheet — "hello world example" in Every Format

Format Output Separator Typical Use
UPPERCASE HELLO WORLD EXAMPLE space SQL keywords, emphasis, headers
lowercase hello world example space normalization, case-insensitive search
Title Case Hello World Example space headlines, book titles, UI page titles
Sentence case Hello world example space body copy, UI labels, descriptions
camelCase helloWorldExample none (caps) JS/TS variables and functions
PascalCase HelloWorldExample none (caps) classes, types, React components, Go exports
snake_case hello_world_example underscore (_) Python, Ruby, SQL columns, JSON keys
kebab-case hello-world-example hyphen (-) URL slugs, CSS classes, npm packages
CONSTANT_CASE HELLO_WORLD_EXAMPLE underscore (_) constants, enum values, env variables

Where Each Case Is Actually Used

Case Language / Context Real Examples
camelCase JavaScript, TypeScript, Java, Kotlin (variables, functions) getUserName, isLoggedIn, fetchOrders
PascalCase C#, TypeScript (types), React/Vue components, Go (exported) UserProfile, OrderService, HttpClient
snake_case Python (PEP 8), Ruby, Rust, SQL columns, JSON keys user_id, created_at, get_user_data
kebab-case URL slugs, CSS classes, HTML custom elements, npm pkgs /blog/my-first-post, .btn-primary, <my-widget>
CONSTANT_CASE Env vars, constants, enum values (most languages) DATABASE_URL, MAX_RETRIES, API_BASE_URL
UPPERCASE SQL keywords, headers, abbreviations SELECT * FROM users WHERE id = 1
Title Case Headlines, book titles, marketing copy "Ten Ways to Convert Text Case"
Sentence case UI labels, button text, body content "Save changes", "Reset password"

Pair this tool with the Lorem Ipsum generator when you need placeholder copy in a specific case, or the Markdown to HTML converter for converting full documents.

Frequently Asked Questions

What's the difference between Title Case and Sentence case?

Title Case capitalizes the first letter of every major word ("How to Convert Text Case Online"), following style-guide rules about which short words to lowercase. Sentence case capitalizes only the first word and any proper nouns ("How to convert text case online"). Use Title Case for headlines, article titles, and book titles. Use Sentence case for UI labels, body copy, descriptions, and most modern web interfaces — Material Design, GitHub Primer, and Atlassian Design Guidelines all recommend Sentence case for buttons and links because it reads more naturally.

How do AP and Chicago title case rules differ?

Both AP and Chicago capitalize the first and last word of a title, plus all nouns, verbs, pronouns, and adjectives. They diverge on smaller words: AP capitalizes prepositions of 4+ letters ("With", "From", "Into") and capitalizes "as" when used as an adverb; Chicago Manual of Style lowercases all prepositions regardless of length and always lowercases "as" and the infinitive "to". AP also lowercases the conjunctions "yet" and "so", while Chicago capitalizes both. Both styles lowercase articles ("a", "an", "the") in the middle of a title. Title Case here applies a single consistent rule — review the output and adjust to your house style.

Is there a "smart" Title Case that preserves articles and prepositions?

This converter applies a consistent rule that capitalizes every word and leaves articles/prepositions lowercased in the middle of a title (closer to AP without the 4-letter rule). It does not yet auto-detect proper nouns, brand names ("iPhone", "eBay"), or technical terms ("HTML", "API") — those require manual review. If you need strict AP, Chicago, APA, or MLA enforcement with proper-noun overrides, capitalizemytitle.com and titlecaseconverter.com offer per-style toggles.

How are acronyms handled in camelCase and PascalCase?

Standard camelCase treats each word as a unit, so "HTML parser" becomes htmlParser, not HTMLParser, and "parse URL ID" becomes parseUrlId, not parseURLID. This matches the dominant JavaScript and Google Java style-guide convention: treat acronyms as ordinary words. The reasoning is consistency — getHttpUrl is easier to read and case-flip than getHTTPURL, and you avoid ambiguity between adjacent acronyms (XMLHTTPRequest versus XmlHttpRequest). Microsoft's .NET naming guidelines, by contrast, recommend keeping 2-letter acronyms uppercase (IOStream) but PascalCasing longer ones (HtmlParser). Adjust manually if you need a specific convention.

When should I use snake_case versus kebab-case?

Use snake_case anywhere underscores are valid in identifiers: Python variables (PEP 8), Ruby methods, Rust modules, SQL column names, environment variables, and most JSON API keys. Use kebab-case anywhere hyphens are the convention but won't be parsed as a minus sign: URL paths, CSS class names, HTML custom elements (<my-widget>), npm package names, Git branch names, and CLI flag long-forms (--dry-run). Most programming languages reject hyphens in identifiers because they're ambiguous with subtraction, which is why kebab-case is confined to "outer-shell" contexts (HTML, CSS, URLs, filenames) rather than runtime code.

What is CONSTANT_CASE and where is it required?

CONSTANT_CASE (also called SCREAMING_SNAKE_CASE or upper snake case) is uppercase letters with underscores between words: DATABASE_URL, STRIPE_SECRET_KEY, MAX_RETRY_COUNT. It's the universal convention for environment variables across Linux, macOS, Windows, Docker, Kubernetes, GitHub Actions, and every major CI system, because shell environments traditionally treat lowercase variables as user-defined and uppercase as system-defined. It's also the convention for compile-time constants in C, Java (public static final), Python module-level constants (per PEP 8), and most enum value names. The all-caps signals "this value is fixed and should not be mutated".

Does converting to camelCase preserve numbers correctly (e.g., URLId vs urlId)?

Numbers adjacent to letters stay glued to the surrounding word — version2update converts to version2update in camelCase, not version2Update, because the converter only splits on whitespace, hyphens, underscores, and capital-letter boundaries. For acronyms followed by ID-like suffixes, the JavaScript convention is urlId (treating "URL" as one word and "Id" as the next), not URLId or URLID. Google's TypeScript style guide and Airbnb's JavaScript style guide both prescribe urlId. If you're working in a codebase that uses URLId, do a find/replace after conversion.

Can I convert multi-line text and lists of variables?

Yes. The converter processes the input as a whole, preserving line breaks. Paste a list of 50 SQL column names, click snake_case → camelCase, and every name converts in place. Empty lines are kept. This works well for renaming a full set of database fields, JSON keys, or CSV headers in a single pass. For converting field names inside a structured document, use the JSON to YAML converter to round-trip the structure, or paste keys here and substitute manually.

Does the converter run on my device or upload my text?

Everything runs in your browser via JavaScript — text never leaves your device, no upload, no server roundtrip, no analytics on the content. That makes it safe for confidential variable names, internal database schemas, unreleased product copy, and source code snippets. The page works offline once loaded; refresh resets the input. Pair with Text Diff to compare before/after, or Word Counter to verify length after case changes.

Image Tools

Image CompressorCompress JPEGCompress PNGCompress GIFCompress WebPImage ConverterJPG ConverterImage Resizer

Video Tools

Video CompressorCompress MP4MP4 to GIFVideo to GIFVideo ConverterMP4 ConverterVideo Cutter

Audio Tools

Audio CompressorCompress MP3Compress WAVAudio ConverterMP3 ConverterFLAC to MP3Audio Cutter

Document Tools

Compress PDFMerge Images to PDFSplit PDFPDF to JPGUnzip FilesRAR Extractor
© 2026 XConvert.com. All Rights Reserved.
About UsPrivacy PolicyTerms of ServiceContactHelp Us Grow