Free Case Converter
Convert text between 9 naming conventions used across programming languages, databases, APIs, URLs, and written content. Type or paste any text and instantly see it in UPPERCASE, lowercase, Title Case, Sentence case, camelCase, PascalCase, snake_case, kebab-case, and CONSTANT_CASE — all at once, updating live as you type. JavaScript uses camelCase for variables, Python and Ruby use snake_case, CSS uses kebab-case for class names, Java and React use PascalCase for classes and components, and Go uses PascalCase to export identifiers. Instead of memorizing the rules or rewriting names by hand, paste your text once and copy the convention you need. The tool splits words intelligently from any input format — including mixed-case strings, acronyms, and special characters — then reassembles them in each target case. Everything runs locally in your browser with no server, no signup, and no data collection.
Loading...
Need expert help with AI?
Looking for a specialist to help integrate, optimize, or consult on AI systems? Book a one-on-one technical consultation with an experienced AI consultant to get tailored advice.
Why Naming Conventions Matter and How This Case Converter Helps
Every programming language, framework, and platform enforces its own naming convention. JavaScript and TypeScript use camelCase for variables and functions. Python, Ruby, and Rust use snake_case. CSS uses kebab-case for class names and custom properties. Java, C#, and React use PascalCase for classes and components. Go uses PascalCase to mark identifiers as exported and camelCase for package-private names. Environment variables, constants, and enum values universally use CONSTANT_CASE (also called SCREAMING_SNAKE_CASE). Violating these conventions does not always cause errors, but it makes code harder to read, triggers linter warnings, and signals inexperience to other developers reviewing your work.
This tool converts text to all 9 common cases simultaneously, so you can see every option at once and copy the one you need. It handles mixed-case input, acronyms like "HTMLParser" or "APIKey," and special characters, splitting words intelligently at case transitions, separators, and whitespace before reassembling them in each target convention. Whether you are converting database column names from snake_case to camelCase for a REST API response, turning a blog post title into a URL slug, or renaming a Python function to match JavaScript conventions, you get the result in one paste and one click.
A Brief History of Programming Naming Conventions
The underscore convention that became snake_case dates back to the 1960s, when IBM mainframe systems used underscores to separate words in data field names. It was popularized in the 1970s by the C programming language and later formalized in Python PEP 8 in 2001. The term "snake_case" itself first appeared on Usenet in 2004, coined in the Ruby community by Gavin Kistner — the name comes from the visual resemblance of underscores to a snake slithering between words.
camelCase emerged at Xerox PARC in the late 1970s. The PARC Mesa Language Manual (1979) included strict coding standards using medial capitals, and the convention spread through the Smalltalk language in the early 1980s. Niklaus Wirth, creator of Pascal, adopted the style after a PARC sabbatical and carried it into Modula. The term "CamelCase" — referring to the humps formed by capital letters — appeared on Usenet by 1990. PascalCase is simply camelCase with the first letter also capitalized, named after the Pascal language where it was standard.
kebab-case is the youngest convention by name. While hyphens have been used in CSS property names (background-color, font-family) and HTML attributes (aria-label, data-*) since the earliest web standards, the term "kebab-case" was first recorded in a Stack Overflow post in 2013. It is now the standard for CSS class names (BEM uses it), URL slugs (Google treats hyphens as word separators), and CLI flags (--output-dir). CONSTANT_CASE, meanwhile, inherited from C preprocessor macros (#define BUFFER_SIZE) and became the universal convention for compile-time constants, enum values, and environment variables across nearly every language.
Case Conventions Across Languages, APIs, and Databases
Choosing the right case convention depends on context. For code identifiers, follow the language standard: camelCase for JavaScript/TypeScript variables and functions, snake_case for Python/Ruby/Rust, PascalCase for classes in Java/C#/TypeScript and for React/Vue components, and CONSTANT_CASE for constants everywhere. In Go, the convention does double duty — PascalCase identifiers (MyFunc) are exported from a package, while camelCase identifiers (myFunc) are package-private, replacing public/private keywords entirely.
For REST API JSON fields, the ecosystem is split. camelCase is the most common choice for APIs consumed by JavaScript frontends, since it matches the language convention and avoids runtime field-name mapping. Google, Twitter, and Stripe all use camelCase in their JSON APIs. APIs consumed primarily by Python or Ruby backends sometimes prefer snake_case for consistency. The key rule is consistency — pick one and enforce it across every endpoint, using a DTO layer to translate between your database convention and your API convention if they differ.
For databases, snake_case is the safest and most widely recommended convention. PostgreSQL folds unquoted identifiers to lowercase, so CreatedAt becomes createdat unless double-quoted in every query — a maintenance burden that snake_case (created_at) avoids entirely. MySQL behaves differently on Linux (case-sensitive) versus macOS/Windows (case-insensitive), making snake_case the most portable choice. For URL slugs, kebab-case is the clear winner: Google treats hyphens as word separators for indexing, and every major CMS and static site generator (WordPress, Ghost, Hugo, Next.js) generates hyphenated slugs by default.
More Free Tools
How It Works
Type or paste your text into the input field.
See all 9 case conversions update instantly.
Click Copy on any conversion to copy it to your clipboard.
Key Features
Privacy & Trust
Use Cases
Frequently Asked Questions
Is this Case Converter free?
Yes, it is 100% free with no usage limits, no signup, and no per-conversion charges. The tool runs entirely in your browser using client-side JavaScript, so there are no server costs. You can convert as much text as you want, as many times as you want.
What is camelCase and which languages use it?
camelCase capitalizes the first letter of each word except the first, with no separators between words. Example: myVariableName. It originated at Xerox PARC in the late 1970s with the Mesa programming language and spread through Smalltalk in the 1980s. Today it is the standard naming convention for variables and functions in JavaScript, TypeScript, and Java. It is also the dominant convention for JSON field names in REST APIs consumed by web and mobile clients.
What is snake_case and which languages use it?
snake_case uses all lowercase letters with underscores separating words. Example: my_variable_name. The underscore convention dates back to the 1960s and was popularized by C in the 1970s. Today it is the standard naming convention in Python (formalized in PEP 8), Ruby, Rust, and Elixir. It is also the dominant convention for database column and table names in PostgreSQL and MySQL, where unquoted identifiers are case-insensitive and lowercase with underscores avoids the need for double-quoting.
What is kebab-case and where is it used?
kebab-case uses all lowercase letters with hyphens separating words. Example: my-component-name. The name — coined around 2013 — comes from the visual resemblance to items on a kebab skewer. It is the standard convention for CSS class names, CSS custom properties (--my-color), HTML attributes (data-user-id, aria-label), and CLI flags (--output-dir). It is also the recommended format for URL slugs because Google treats hyphens as word separators, making my-blog-post more SEO-friendly than my_blog_post or myblogpost.
What is PascalCase and which languages use it?
PascalCase (also called UpperCamelCase) capitalizes the first letter of every word with no separators. Example: MyComponentName. It takes its name from the Pascal programming language, whose creator Niklaus Wirth adopted the convention after a sabbatical at Xerox PARC. Today it is the standard for class names in Java, C#, TypeScript, and Python, for React and Vue component names, for TypeScript interfaces and type aliases, and for Go exported identifiers — in Go, any function or variable starting with an uppercase letter is automatically exported from its package.
What is CONSTANT_CASE and when should I use it?
CONSTANT_CASE (also called SCREAMING_SNAKE_CASE or MACRO_CASE) uses all uppercase letters with underscores between words. Example: MAX_RETRY_COUNT. It is the universal convention for constants and enum values across nearly every language — JavaScript (const MAX_RETRIES), Python, Java, C, C++, Ruby, Rust, and Go. It is also the standard for environment variables (DATABASE_URL, API_SECRET_KEY) and C preprocessor macros (#define BUFFER_SIZE). The all-caps style signals to other developers that a value is fixed and should not be reassigned.
What is Title Case and what are the rules?
Title Case capitalizes the first letter of major words in a phrase, typically used for headings, article titles, and book names. The exact rules vary by style guide. The Associated Press (AP) Stylebook capitalizes all words of four or more letters and lowercases short articles (a, an, the), conjunctions (and, but, or), and prepositions under four letters. The Chicago Manual of Style lowercases all prepositions regardless of length (including "through," "between," "without") but capitalizes "yet" and "so." Both styles capitalize the first and last word of a title. This tool applies general Title Case rules that work well for most headings and blog post titles.
What is Sentence case?
Sentence case capitalizes only the first letter of the first word and any proper nouns, just like a normal sentence. Example: "Convert your text to any case" rather than "Convert Your Text To Any Case." It is the most common convention for UI button labels, form field labels, notification messages, and body text. Google Material Design and Apple Human Interface Guidelines both recommend sentence case for most UI elements because it reads more naturally and is easier to scan.
Should REST API JSON fields use camelCase or snake_case?
The JSON specification (RFC 8259) does not mandate a naming convention for keys, so both are valid. In practice, camelCase is the more common choice for APIs consumed by JavaScript and TypeScript frontends, since it matches the language convention and avoids the need for field-name transformation. Google, Twitter, and Stripe all use camelCase in their JSON APIs. On the other hand, APIs consumed primarily by Python or Ruby backends often use snake_case for consistency with those languages. The most important rule is to pick one convention and apply it consistently across every endpoint. Many teams use a DTO (Data Transfer Object) layer to translate between snake_case database columns and camelCase API responses.
What naming convention should I use for database columns?
snake_case is the most widely recommended convention for SQL database columns and table names. PostgreSQL converts unquoted identifiers to lowercase, so MyColumn becomes mycolumn unless you double-quote it in every query. Using snake_case (my_column) avoids this problem entirely and is the default convention recommended by PostgreSQL, Rails (Active Record), Django ORM, and Supabase. MySQL is case-sensitive on Linux but case-insensitive on macOS and Windows, making snake_case the safest cross-platform choice. Column names like created_at, user_id, and order_total are universally readable without needing to consult a schema.
What case should I use for URL slugs?
kebab-case (lowercase with hyphens) is the recommended convention for URL slugs. Google treats hyphens as word separators but treats underscores as word joiners — so /blog/my-post-title is indexed as three separate words, while /blog/my_post_title may be treated as a single token. Google engineer Matt Cutts confirmed this guidance in 2011 and it remains current. Beyond SEO, hyphens are easier to read in a browser address bar and are the convention used by WordPress, Ghost, Hugo, Next.js, and virtually every modern CMS and static site generator.
Why does Go use uppercase to export identifiers?
In Go, the visibility of a name is determined by its first character: identifiers starting with an uppercase letter (PascalCase like MyFunction) are exported and accessible from other packages, while those starting with a lowercase letter (camelCase like myFunction) are unexported and package-private. This replaces the public/private keywords found in other languages with a simple casing convention. Go does not use snake_case at all — the official style guide explicitly discourages underscores in identifiers. This design makes the visibility of any identifier immediately obvious at a glance without needing to check a separate declaration.
What are the Unicode edge cases in case conversion?
Case conversion is not as simple as it seems for non-English text. The most famous edge case is the Turkish I problem: in Turkish, lowercase "i" uppercases to a dotted "I" (U+0130), and uppercase "I" lowercases to a dotless "i" (U+0131) — the opposite of English. This has caused real bugs in applications that use locale-unaware toUpperCase(). Another edge case is the German eszett (ss): the lowercase "ss" uppercases to "SS" in standard German, a transformation that is not reversible. Greek sigma has two lowercase forms depending on position — "s" (sigma) in the middle of a word and "s" (final sigma) at the end. This tool uses JavaScript standard casing which follows English locale rules and does not handle these locale-specific cases.
What naming convention does each major language use?
Here is a quick reference: JavaScript and TypeScript use camelCase for variables and functions, PascalCase for classes and React components. Python uses snake_case for variables, functions, and modules (PEP 8), PascalCase for classes. Java uses camelCase for variables and methods, PascalCase for classes. C# follows the same pattern as Java. Go uses PascalCase for exported identifiers and camelCase for unexported ones — no underscores. Ruby uses snake_case for variables and methods, PascalCase for classes, and SCREAMING_SNAKE_CASE for constants. Rust uses snake_case for variables, functions, and modules, PascalCase for types and traits, and SCREAMING_SNAKE_CASE for statics and constants. CSS uses kebab-case for class names and custom properties. PHP uses camelCase for methods (PSR-12) and PascalCase for classes.
How does this tool split words from mixed input?
The tool uses intelligent word boundary detection that handles multiple input formats. It splits on existing separators (spaces, underscores, hyphens), on transitions from lowercase to uppercase (splitting "camelCase" into "camel" and "Case"), and on transitions from a run of uppercase letters to a lowercase letter (splitting "HTMLParser" into "HTML" and "Parser"). This means you can paste text in any format — a sentence with spaces, a camelCase variable, a snake_case column name, or a CONSTANT_CASE enum — and the tool will correctly identify the individual words before reassembling them in every target convention.
Limitations
- Does not handle language-specific casing rules (Turkish I, German eszett)
- May not correctly split acronyms in all cases
- Does not support custom separator characters
Q&A SESSION
Got a quick technical question?
Skip the back-and-forth. Get a direct answer from an experienced engineer.
