Back to HomeWeConvertFiles Guide

Online Case Converter for Text and Code Identifiers

Nine text-case styles

Capitalization conventions vary across headlines, filenames, URLs, APIs, databases, and source code, and rewriting a long list by hand is slow and error-prone. The Case Converter transforms pasted text into nine styles: UPPERCASE, lowercase, Title Case, Sentence case, camelCase, PascalCase, snake_case, kebab-case, and CONSTANT_CASE. It preserves line breaks, updates the selected conversion while you type, displays input/output word and character counts, copies the result, and downloads UTF-8 text as converted-text.txt.

Convert text case

Quick answer. Paste or type text, then select one of the nine case buttons. The output appears immediately, and if you continue editing while a style is active, the output updates live. Copy the converted text or download the .txt file. Use uppercase/lowercase for direct letter conversion, title/sentence case for basic prose formatting, and camel/Pascal/snake/kebab/constant case for identifier-like text after checking punctuation.

Supported case styles

Using the input customer order status:

StyleExample outputCommon use
UPPERCASECUSTOMER ORDER STATUSLabels, emphasis, normalized comparisons
lowercasecustomer order statusNormalized text, tags, simple filenames
Title CaseCustomer Order StatusBasic headings and labels
Sentence caseCustomer order statusBasic prose normalization
camelCasecustomerOrderStatusJavaScript variables, JSON fields
PascalCaseCustomerOrderStatusClasses, types, components
snake_casecustomer_order_statusPython variables, database fields
kebab-casecustomer-order-statusURLs, CSS classes, filenames
CONSTANT_CASECUSTOMER_ORDER_STATUSConstants, environment-variable names

These are mechanical transformations. Project conventions, style guides, language rules, and identifier restrictions still apply. No style is selected initially, so output remains empty until you choose one, and Clear removes both text areas, resets their counts, and deselects the active style.

Uppercase, lowercase, Title, and Sentence case

UPPERCASE applies JavaScript's toUpperCase() and lowercase applies toLowerCase() to the whole string; whitespace, punctuation, and line breaks remain while cased letters convert. Neither removes accents, punctuation, or spaces, so lowercase does not create a URL slug by itself — choose kebab-case for a separator transformation.

The Title Case option finds every non-whitespace token, uppercases its first character, and lowercases the remainder. This is simple token capitalization, not publication-style title casing: it does not keep short words lowercase and does not preserve acronyms, and hyphenated content stays one token:

building an API with JSON  →  Building An Api With Json
state-of-the-art design    →  State-of-the-art Design

Sentence case first lowercases the entire input, then capitalizes an ASCII letter at the beginning of the text after optional whitespace, at the beginning of a new line, or after ., !, or ? followed by whitespace. Because all text is lowercased first, proper nouns and acronyms must be restored, and a sentence starting with a quotation mark, digit, or non-Latin script may not capitalize as expected:

HELLO WORLD. THIS IS A TEST!  →  Hello world. This is a test!
OPENAI RELEASED AN API.       →  Openai released an api.

Identifier styles and word splitting

camelCase, PascalCase, snake_case, kebab-case, and CONSTANT_CASE share one word splitter. For each line it inserts a space between a lowercase/digit and a following uppercase, separates an acronym from a following capitalized word, replaces underscore and hyphen runs with spaces, trims, and splits on whitespace. camelCase lowercases the first word and capitalizes each later word; PascalCase capitalizes every word; snake/kebab lowercase and join with _ or -; CONSTANT_CASE uppercases and joins with _:

Customer_Profile-Image  →  customerProfileImage   (camelCase)
HTTPResponseCode        →  httpResponseCode       (camelCase)
XMLHttpRequest          →  XmlHttpRequest         (PascalCase)
accountDisplayName      →  account_display_name   (snake_case)
Summer Sale Landing     →  summer-sale-landing    (kebab-case)
maximumRetryCount       →  MAXIMUM_RETRY_COUNT    (CONSTANT_CASE)

Acronyms are normalized like ordinary words, so XML can become Xml — review project conventions such as URLParser versus UrlParser. Punctuation other than _ and - is not removed, so a comma or slash can remain attached to a word and produce an invalid identifier. Because kebab-case uses -, it is usually not a valid variable name in languages that read - as subtraction. Sanitize punctuation according to the destination rather than assuming the converter validates it.

Multiline conversion and counts

All modes retain line breaks. Upper, lower, title, and sentence case operate across the full string while preserving newlines; identifier-style modes split on \n, convert each line independently, and join again. Blank lines remain blank, and within each nonblank identifier line, multiple separators collapse into the chosen join character:

Customer Name      →  customer_name
Account Status     →  account_status
Created At         →  created_at

Both input and output show live counts. The word count trims text, splits on runs of whitespace, and counts non-empty tokens — so a hyphenated term with no spaces counts as one word even though structured-case conversion can split it into multiple detected words. The character count is JavaScript string .length, which counts UTF-16 code units including spaces, punctuation, and line breaks, so many emoji and some less-common characters count as two or more. Counts are useful for quick comparison but are not linguistic segmentation or Unicode grapheme counts.

Unicode and locale limitations

JavaScript's default toUpperCase() and toLowerCase() apply Unicode case mappings but are not tailored to a selected locale. Languages with context- or locale-sensitive casing can produce results different from editorial expectations — for example, the dotted and dotless forms of the letter I in Turkish. Case conversion can also change string length: German ß can uppercase to SS, so output character counts may differ even when separators are unchanged.

The structured-case boundary expressions primarily recognize ASCII [a-z], [A-Z], and digits, so case transitions in other scripts may not split into words. Use locale-aware language processing for internationalized publishing workflows.

Using case conversion for URLs and code

kebab-case is a useful starting format for URLs, but a production slug pipeline should also decide whether to remove or transliterate accents, which punctuation is allowed, how to handle apostrophes and symbols, maximum length, uniqueness suffixes, reserved paths, stop-word policy, and redirects when a slug changes. Never change a live URL merely for capitalization without planning redirects and canonical links.

Naming styles communicate convention, but renaming a symbol can be a breaking change. Before replacing identifiers, update every reference, preserve serialized/API field contracts, check reflection and string-based lookups, run type checking and tests, and review database migrations. The tool is a text transformer, not a language-aware refactoring engine — it cannot distinguish a variable from a string literal, comment, external API property, or reserved keyword.

Common conversion surprises

Acronyms become ordinary words

Title and structured styles normalize internal letters, so API, HTTP, or XML can become Api, Http, or Xml.

Proper names lose capitalization

Sentence case lowercases everything before restoring basic sentence starts. Correct people, products, places, and brands manually.

Punctuation remains in identifiers

Only whitespace, hyphens, underscores, and recognized case transitions act as structured separators. Remove commas, slashes, brackets, and other invalid characters yourself.

Title Case does not match a style guide

Every whitespace token is capitalized mechanically. Editorial small-word and hyphenation rules are not applied.

Word counts seem different from converted segments

Statistics split only on whitespace; the identifier converter also detects hyphens, underscores, and camel boundaries.

Emoji count as multiple characters

The character statistic reports UTF-16 code units, not grapheme clusters.

Privacy and browser-based processing

Conversion and counting use plain JavaScript in the browser and require no remote text-processing service. The tool works with pasted text rather than file uploads.

Text can still contain private names, internal identifiers, unpublished copy, or credentials. Avoid pasting secrets, use a trusted device, and consider clipboard history when copying output. Client-side transformation does not validate or anonymize the content.

Frequently asked questions

Which case styles are supported?

UPPERCASE, lowercase, Title Case, Sentence case, camelCase, PascalCase, snake_case, kebab-case, and CONSTANT_CASE.

Does conversion update while I type?

Yes. After selecting a style, edits to the input automatically regenerate the output.

Are line breaks preserved?

Yes. Identifier styles convert every line independently, and all modes retain newline structure.

Is Title Case based on an editorial style guide?

No. It capitalizes the first character of every non-whitespace token and lowercases the rest.

Does Sentence case preserve names and acronyms?

No. It lowercases the full input first, so proper capitalization must be restored manually.

Does camelCase remove punctuation?

Not generally. Hyphens and underscores become separators, but other punctuation can remain attached to words.

How are words counted?

The statistics trim and split on whitespace. This differs from the boundary logic used for identifier styles.

How are characters counted?

With JavaScript string length, which counts UTF-16 code units including whitespace and punctuation.

What is the download filename?

Converted output downloads as UTF-8 text named converted-text.txt.

Does the tool refactor source code safely?

No. It transforms text without understanding syntax, references, types, or API contracts.

Related tools

Word & Character Counter

Get broader text-length and reading-time statistics.

Code Minifier & Beautifier

Format HTML, CSS, and JavaScript rather than text case.

Regex Tester

Validate destination-specific identifier patterns.

Related guides

QR Code Generator Guide

Generate high-quality custom QR Codes for any URL, text, or phone number instantly.

Word & Character Counter Guide

Live-updates word, character, and paragraph counts plus a reading-time estimate.

JSON Formatter / Validator Guide

Format, validate, beautify, and minify raw JSON string data dynamically.

Convert text case

Paste text, pick one of nine case styles, and copy or download converted-text.txt.

Use Case Converter