String Case Converter
Convert text between different naming conventions instantly
Supports camelCase, PascalCase, snake_case, kebab-case, and space-separated text
camelCase
snake_case
kebab-case
PascalCase
SCREAMING_SNAKE_CASE
Title Case
Case Format Guide
camelCase
First word lowercase, subsequent words capitalized. No separators. Common in JavaScript.
helloWorldsnake_case
Words separated by underscores, all lowercase. Common in Python, databases.
hello_worldkebab-case
Words separated by hyphens, all lowercase. Common in URLs, CSS classes.
hello-worldPascalCase
All words capitalized, no separators. Common in class names and type definitions.
HelloWorldSCREAMING_SNAKE_CASE
Uppercase words separated by underscores. Common for constants.
HELLO_WORLDTitle Case
Each word capitalized and separated by spaces. Common in display names.
Hello WorldUnderstanding Naming Conventions
A naming convention is a standardized format for writing identifiers (variable names, function names, class names, constants) in code. Different programming languages, frameworks, and teams use different conventions based on readability preferences, language syntax requirements, and community standards. For example, JavaScript typically uses camelCase for variables and functions but PascalCase for class names. Python uses snake_case for functions and variables but SCREAMING_SNAKE_CASE for constants. CSS uses kebab-case for class and ID names, not camelCase. Inconsistent naming conventions make code harder to read and can lead to errors when importing between systems.
This string case converter solves the common problem of converting text between these different conventions. Developers frequently need to convert database column names (typically snake_case) to JavaScript variable names (camelCase), or transform API response fields to match backend naming standards. Rather than manually retyping or creating complex find-and-replace patterns, this tool instantly converts between all six major conventions.
Common Use Cases
- Converting database columns to JavaScript variables: Database systems and SQL conventions use snake_case for column names (user_id, first_name, created_at), while JavaScript prefers camelCase (userId, firstName, createdAt). This tool converts between them instantly.
- Reformatting API field names: Backend APIs may return JSON with snake_case field names, but frontend frameworks expect camelCase. This converter quickly transforms entire field name lists to match your framework's conventions.
- Generating CSS class names from design variables: Designers often name colors and components in PascalCase (BrandBlue, PrimaryButton), but CSS requires kebab-case (.brand-blue, .primary-button). Convert quickly without manual editing.
- Creating TypeScript/C# class and interface names: Converting English descriptions to PascalCase for class names (User Manager, Product Service) is a frequent refactoring task when moving from planning to coding.
- Formatting environment variable names: Environment variables traditionally use SCREAMING_SNAKE_CASE (DATABASE_URL, API_KEY) for visibility in shell scripts. This tool converts any format into the required uppercase style.
How to Use This Tool
- Enter your text: Paste or type text in any format β camelCase, PascalCase, snake_case, kebab-case, SCREAMING_SNAKE_CASE, spaces, or mixed. The tool auto-detects word boundaries.
- View all conversions: As you type, all six case formats update in real-time in the grid to the right. No need to select a specific format first.
- Copy your desired format: Click the Copy button next to any output case to copy it to your clipboard. Feedback appears: "Copied!" message confirms success.
- Paste into your project: Paste the converted text directly into your code, configuration files, or documentation without any manual re-typing.
Features
camelCase
Standard for JavaScript and TypeScript variable and function names. Easy to read while keeping names compact. Dominant convention in web development.
PascalCase
Required for class names in most languages (Java, C#, TypeScript, Python). Also used for React component names and type definitions. Signals that a name refers to a type or constructor.
snake_case
Standard for Python functions and variables. Also used in SQL databases, Unix/Linux file systems, and HTTP header names. Considered more readable by some due to consistent spacing.
kebab-case, SCREAMING_SNAKE_CASE, Title Case
kebab-case for CSS and URLs; SCREAMING_SNAKE_CASE for constants and environment variables; Title Case for display names, headers, and documentation.
Frequently Asked Questions
What is the difference between camelCase and PascalCase?
camelCase starts with a lowercase letter (userId, firstName), while PascalCase starts with uppercase (UserId, FirstName). This distinction signals meaning in code: camelCase usually means variable/function, PascalCase usually means class/type/constructor. The converter automatically applies the correct capitalization for each format.
When should I use snake_case vs camelCase?
Follow your language's community standards: JavaScript/TypeScript use camelCase, Python uses snake_case, C# uses PascalCase for public members. Within a language, consistency matters more than which style you pick. Most popular languages have style guides (PEP 8 for Python, Google's TypeScript style guide) that specify the expected convention.
Does this tool handle acronyms and numbers correctly?
The converter handles numbers in text and will treat acronyms (like "XMLParser" or "HTTP2") as word boundaries. For unusual acronyms, verify the output matches your intent β if an acronym isn't converted correctly, you can manually adjust the result.
Can I convert entire code snippets at once?
The converter works best on single identifiers (variable names, class names). For entire code snippets, copy-paste variable names one at a time or use your IDE's find-and-replace feature with regex patterns to convert all instances at once.