Text Free

Case Converter


Character Count: 0 Word Count: 0 Line Count: 0

A case converter transforms text between different capitalisation formats without requiring manual retyping. Capitalisation conventions carry specific meaning in programming, writing, and data formatting contexts. The same word or phrase must be represented differently depending on where it is used: a variable name in JavaScript, a heading in a document, a column name in a database, and a URL slug each follow distinct formatting rules that a case converter applies automatically.

This tool supports eight case formats: UPPERCASE, lowercase, Title Case, Sentence case, camelCase, PascalCase, snake_case, and kebab-case. Each conversion happens instantly in the browser without sending text to any server. Your content remains private.

The Eight Case Formats and When to Use Each

UPPERCASE converts every character to its capital form. It is used for constants in most programming languages (MAX_RETRY_COUNT), for acronyms and initialisms in written text, and for legal clause headers in formal documents where convention requires all-capitals to signal importance.

lowercase converts every character to its uncapitalised form. It is the default format for most programming identifiers in Python, for domain names, and for URL components that appear after the slash. Email addresses are technically case-insensitive but are universally stored and displayed in lowercase.

Title Case capitalises the first letter of every major word. Style guides disagree on the precise rules: which prepositions, articles, and conjunctions to leave lowercase varies between AP style, Chicago style, and APA style. This tool applies the common convention of capitalising all words except short prepositions, articles, and conjunctions when they appear in the middle of a title.

Sentence case capitalises only the first letter of the first word and any proper nouns. It mirrors the capitalisation convention of a regular English sentence. It is used for subheadings in many publishing and content style guides, including Google’s Material Design and many editorial standards, as an alternative to Title Case that reads more naturally in body text contexts.

camelCase begins with a lowercase letter and capitalises the first letter of each subsequent word with no spaces or punctuation: myVariableName. It is the dominant convention for variable and function names in JavaScript, Java, Swift, and several other languages. The term derives from the visual resemblance of the interior capital letters to a camel’s humps.

PascalCase (also called UpperCamelCase) capitalises the first letter of every word including the first: MyVariableName. It is the convention for class names and constructor functions in most object-oriented languages, including JavaScript, TypeScript, C#, Java, and Python. Component names in React and Vue follow PascalCase by convention.

snake_case uses only lowercase letters and replaces spaces with underscores: my_variable_name. It is the dominant convention for variable and function names in Python, Ruby, and Rust, and for database column names in SQL schemas. Constants in Python and other languages are often represented as UPPER_SNAKE_CASE, combining uppercase with the underscore separator.

kebab-case uses only lowercase letters and replaces spaces with hyphens: my-variable-name. It is used for URL slugs (topicaltrend.com/tools/case-converter), for CSS class names in most style guides, for file names in web projects, and for command-line flags in CLI tools. It is not valid in most programming languages as a variable name because the hyphen is interpreted as a subtraction operator.

How to Use This Converter

Paste or type your text into the input area. Select the target case format from the conversion buttons. The converted text appears in the output area immediately. Copy the result using the copy button. You can convert between any case formats by clicking different buttons without re-entering your text.

The converter handles multi-word inputs, mixed-case inputs, and text that already contains underscores, hyphens, or existing capitalisation patterns. It identifies word boundaries from spaces, existing capitalisation breaks in camelCase or PascalCase inputs, and separator characters in snake_case or kebab-case inputs, then reconstructs the words in the target format.

Case Conventions in Programming Languages

Coding conventions are more than style preferences. In many languages and frameworks, the wrong case in the wrong context produces a runtime error, a failed import, or a component that does not render. React component names must be PascalCase: a component named button instead of Button is treated as a plain HTML element rather than a React component and does not execute its render logic. Python class names by convention use PascalCase; functions and variables use snake_case; module-level constants use UPPER_SNAKE_CASE.

Database schema conventions also carry practical consequences. Most SQL engines are case-insensitive for column names by default, but ORM frameworks (Django, Rails, Laravel) generate and expect snake_case column names that map to camelCase or snake_case properties in the application layer. Mismatched cases between the database schema and the ORM model produce missing-column errors that are confusing to debug because they are invisible to the SQL engine.

CSS class naming conventions differ by methodology. BEM (Block Element Modifier) uses lowercase with hyphens and double underscores: block-name__element–modifier. Utility-first frameworks like Tailwind CSS use kebab-case. SCSS module class names in React projects often use camelCase because they are accessed as JavaScript properties. Converting class names to the correct convention for your project’s methodology is a common use case for this tool.

Case in URLs and SEO

URLs are technically case-sensitive on most web servers running Linux-based operating systems. A page at topicaltrend.com/Tools/Case-Converter is a different URL from topicaltrend.com/tools/case-converter, and both can exist simultaneously as separate pages or one can return a 404 while the other resolves. Search engines may treat capitalised and lowercase versions of a URL as duplicate content or as separate pages, which can split link equity and produce canonicalisation issues.

The universal convention for URL slugs is lowercase kebab-case. Google’s URL best practice guidance recommends lowercase letters in URLs to avoid duplicate content from case variations. Most web frameworks and CMS platforms including WordPress automatically convert slugs to lowercase on publication. Use the kebab-case output from this converter to generate URL-safe slug versions of any text string.

Case in Data Pipelines and API Integration

One of the most common causes of field mapping failures in API integrations is a case mismatch between the sending system and the receiving system. A JSON API that returns firstName in camelCase cannot be directly mapped to a database column named first_name without a transformation layer. A webhook that sends customer_id must be converted to customerId when passed to a JavaScript frontend expecting camelCase property names.

Case converters serve as a quick reference tool when building these transformation mappings. Pasting a set of API field names and converting them to the target system’s convention produces the mapping you need in seconds. For bulk conversions across many fields, convert a list of names in this tool by entering them on separate lines and applying the target case to all lines simultaneously.

Frequently Asked Questions

camelCase is a naming convention where the first word is lowercase and each subsequent word begins with a capital letter, with no spaces or separators: myVariableName. It is the dominant convention for variable names, function names, and object properties in JavaScript, Java, Swift, and several other languages. When you see a multi-word identifier in JavaScript code that has no underscores or hyphens, it is almost certainly in camelCase.

Both formats join words without spaces and capitalise each word's first letter. camelCase starts with a lowercase letter (myClassName). PascalCase starts with an uppercase letter (MyClassName). The practical rule in most languages: use camelCase for variables and functions, use PascalCase for class names, type names, and (in React) component names. In TypeScript, interfaces and type aliases also follow PascalCase by convention.

snake_case uses only lowercase letters and joins words with underscores: my_variable_name. It is the primary naming convention for variables and functions in Python (PEP 8), Ruby, and Rust. SQL database column names almost universally use snake_case by convention. Python constants are written in UPPER_SNAKE_CASE (MAX_CONNECTIONS). When working across Python and JavaScript, converting between snake_case and camelCase is one of the most frequent case transformation tasks.

kebab-case uses only lowercase letters and joins words with hyphens: my-variable-name. It is the standard format for URL slugs, CSS class names (in most methodologies), HTML data attributes (data-user-id), file names in web projects, and CLI tool flags (--dry-run). Hyphens are not valid identifier characters in most programming languages, so kebab-case cannot be used directly as a variable or function name in JavaScript, Python, or similar languages.

Title Case capitalises the first letter of every major word in a heading or title, following the convention of capitalising all words except short prepositions, articles, and conjunctions when they appear in the middle. Sentence case capitalises only the first letter of the first word and any proper nouns, matching the capitalisation of a regular sentence. Google's Material Design and many editorial style guides prefer Sentence case for UI labels and subheadings because it reads more naturally at smaller sizes than Title Case.

Yes. The converter identifies word boundaries from multiple signals: spaces, existing capital letters in camelCase or PascalCase input, and separator characters (underscores or hyphens) in snake_case or kebab-case input. Pasting myExistingCamelCaseVariable into the converter and selecting snake_case will output my_existing_camel_case_variable. Pasting first-name-field and selecting PascalCase will output FirstNameField.

URLs are case-sensitive on most Linux-based web servers. topicaltrend.com/Tools/CaseConverter and topicaltrend.com/tools/case-converter are treated as different pages by the server. Search engines may index both versions separately, splitting link equity between them, or may treat the uppercase version as a 404. The universal web convention is lowercase kebab-case for URL slugs. Most CMS platforms enforce this automatically, and Google's URL guidelines recommend all-lowercase URLs to avoid canonicalisation and duplicate content issues.

UPPER_SNAKE_CASE (also called SCREAMING_SNAKE_CASE) uses all capital letters with words separated by underscores: MAX_RETRY_COUNT. It is the universal convention for constants in Python (PEP 8), JavaScript (by convention), C, C++, and most other languages. The visual distinction from regular snake_case immediately signals to a reader that the value is a constant that will not change at runtime. Environment variable names also follow this convention by convention across all operating systems.