Skip to main content

text-case-converter

A text case converter is a tool that transforms a string between common letter-case conventions: UPPERCASE, lowercase, Title Case, Sentence case, camelCase, PascalCase, snake_case, kebab-case, and CONSTANT_CASE. The ZTools Text Case Converter handles all 9 conventions in one click, intelligently splitting words on spaces, hyphens, underscores, and case boundaries (so helloWorld_demo correctly becomes hello_world_demo or hello-world-demo). Useful for developers renaming variables across naming conventions, content editors fixing inconsistent capitalization, and copywriters formatting headlines.

Use cases​

Renaming variables when migrating between languages​

JavaScript uses camelCase, Python uses snake_case, Go uses PascalCase for exports. When porting code, paste the variable name, click your target convention, and copy the result. Avoids subtle typos when doing dozens of renames by hand.

Formatting headlines and titles for consistency​

Style guides differ on Title Case vs Sentence case. Paste a headline, switch case, see whether it matches your house style. The converter follows AP-style title case rules (skip articles, prepositions under 4 letters, conjunctions).

Converting CSV column headers to database-safe identifiers​

A spreadsheet column named "First Name (Required)" becomes first_name_required in snake_case for SQL columns. Paste each header, convert, paste into your DDL. Saves manual renaming when importing 50-column spreadsheets.

Generating slug-friendly names for URLs and file paths​

Article title "Why JSON Beats XML in 2026" β†’ kebab-case β†’ why-json-beats-xml-in-2026. URL-safe and SEO-friendly. Pair with our URL Slug Generator for special-character handling.

How it works​

  1. Paste text into the input pane β€” Single word, multi-word phrase, or entire paragraph. Length is unlimited β€” handles up to ~1 MB without lag.
  2. Click your target case β€” 9 buttons: UPPER, lower, Title, Sentence, camelCase, PascalCase, snake_case, kebab-case, CONSTANT_CASE. Each shows a live preview of the output.
  3. Word-splitting handles edge cases β€” Splits on spaces, hyphens, underscores, AND camelCase boundaries. So helloWorld and hello-world and hello world all produce the same output for any target case.
  4. Review the output β€” Output appears in the right pane with a character count and word count. Whitespace and punctuation are preserved where the convention allows.
  5. Copy with one click β€” Original stays available so you can switch between conventions without re-pasting.

Examples​

Input: helloWorld example test

Output: camelCase: helloWorldExampleTest | snake_case: hello_world_example_test | kebab-case: hello-world-example-test | PascalCase: HelloWorldExampleTest


Input: WHY JSON beats XML in 2026

Output: Title: Why JSON Beats XML in 2026 | Sentence: Why json beats xml in 2026 | kebab: why-json-beats-xml-in-2026

Frequently asked questions​

What's the difference between camelCase and PascalCase?

camelCase starts lowercase (firstName), PascalCase starts uppercase (FirstName). JavaScript variables and methods use camelCase; React components and TypeScript classes use PascalCase.

How does Title Case decide which words to capitalize?

Style guides differ. The converter follows AP style: capitalize all words except articles (a, an, the), short prepositions (of, in, on, at, by, for, to), and short conjunctions (and, or, but, nor) unless they're the first or last word.

How does the converter split "compound" words?

It splits on spaces, hyphens, underscores, AND case boundaries. So getUserName, get-user-name, get_user_name, and Get User Name all produce the same canonical word list.

Does it preserve numbers?

Yes. parseInt2 becomes parse_int_2 in snake_case (digits stay attached to the preceding word).

Can I convert back to the original case?

Once you convert to a target case and copy, the conversion is one-way (information about the original word boundaries may be lost in some conventions). Keep the original input visible in the left pane if you need it.

Is the converter Unicode-aware?

Yes β€” accented characters and non-Latin scripts are handled correctly. UPPER and lower work for German ß, Greek Ξ±/Ξ‘, Cyrillic, etc.

Tips​

  • For database columns, prefer snake_case β€” it's the SQL convention and case-insensitive on most engines.
  • For URL slugs, use kebab-case β€” readable to humans and SEO-friendly.
  • For React component files, use PascalCase β€” the React convention.
  • For JavaScript constants, use CONSTANT_CASE β€” the universal "this is a constant" signal.

Try it now​

The full text-case-converter runs in your browser at https://ztools.zaions.com/text-case-converter β€” no signup, no upload, no data leaves your device.

Open the tool β†—


Last updated: 2026-05-05 Β· Author: Ahsan Mahmood Β· Edit this page on GitHub