LIVE
0 words
0 chars
0 lines
en-US lang

Case Converter

Convert text to UPPERCASE, lowercase, Title Case or camelCase.

local-only instant no upload
— Text Tools Online
✎ NOTES ON THIS TOOL

The Naming Convention Argument Every Dev Team Has Had

Python developers write user_profile_data. Java developers write userProfileData. CSS class names use user-profile-data. Database columns often use user_profile_data again. And if you are writing a React component, the component itself is UserProfileData in PascalCase while its props are camelCase.

When you copy text between these contexts — say, grabbing a column name from a database schema and turning it into a JavaScript variable — manual conversion is tedious and error-prone. A quick paste into a case converter eliminates the friction entirely.

Every Case Format and When to Use It

  • UPPERCASE: Constants in most languages (MAX_RETRIES), acronyms, SQL keywords by convention, emphasis in plain text.
  • lowercase: URL slugs, HTML attributes, CSS property values, email addresses, Unix command names.
  • Title Case: Article headlines, book titles, product names, navigation menu items. Rules for which words to capitalize are debated — see FAQ below.
  • Sentence case: Normal prose, UI button labels (per Material Design and Apple HIG guidelines), error messages.
  • camelCase: JavaScript/TypeScript variables and functions, Java methods and fields, JSON keys by convention.
  • PascalCase (UpperCamelCase): Class names in most OOP languages, React components, C# methods, TypeScript interfaces.
  • snake_case: Python variables, functions, and modules; database column names; Ruby methods; file names in many ecosystems.
  • kebab-case: HTML/CSS class names, URL slugs, file names in front-end projects, CLI flag names.
  • SCREAMING_SNAKE_CASE: Environment variables (DATABASE_URL), constants in Python and C, Makefile targets.

Why You Cannot Always Rely on IDE Auto-Rename

IDEs handle renaming within a single language file reasonably well. But when the same concept spans a database schema, a REST API response, a front-end component, and a documentation page, there is no single tool that renames across all layers simultaneously. A standalone case converter lets you transform a name once and paste the right format wherever it is needed — no search-and-replace, no typos from manual retyping.

How the Conversion Logic Works

The converter first tokenises the input by splitting on spaces, underscores, hyphens, and camelCase boundaries (detecting uppercase letters that follow lowercase letters). This means it correctly handles mixed-case inputs: myHTTPSRequest → tokens [my, HTTPS, Request] → snake_case: my_https_request. The tokenisation step is the hard part; once tokens are identified, reassembly into any target format is straightforward.

Questions

01 Title Case — do you capitalise prepositions and conjunctions? +

It depends on which style guide you follow. AP Style capitalises prepositions of four or more letters (e.g., "With", "From", "Between") but lowercases shorter ones ("in", "on", "at"). Chicago Manual of Style lowercases all prepositions regardless of length. APA capitalises words of four or more letters including prepositions. This tool applies a general rule: words of four or more characters are capitalised; words of three or fewer are lowercased unless they are the first or last word.

02 How does the converter handle acronyms like "API" or "HTML"? +

When converting to camelCase or snake_case, the converter treats consecutive uppercase letters as a single token. "HTMLParser" becomes "html_parser" in snake_case, not "h_t_m_l_parser". When converting to Title Case, all-caps sequences are preserved as-is.

03 What happens to numbers in the text? +

Numbers are treated as word-boundary markers in camelCase and snake_case conversions. "address2line" stays as-is in lowercase; in snake_case it becomes "address_2_line" since the digit is treated as a separate token. In Title Case, numbers are left unchanged.

04 Why does my IDE have a rename function but I still need this tool? +

IDE rename refactors within one codebase and one language. When the same concept appears in a database schema, an API spec, a front-end template, and a documentation page written in different tools, there is no single rename operation that covers all of them. A case converter lets you transform once and paste the right format everywhere.