How do I convert text between camelCase, snake_case, and other cases?
Paste your text and instantly see it converted to camelCase, PascalCase, snake_case, kebab-case, CONSTANT_CASE, Title Case, and more. You can copy any result with one click. All processing happens in your browser.
user_first_name
userFirstName
Text Case Converter
Convert text between camelCase, snake_case, kebab-case, and more. Results update as you type.
About Case Conversion
- Automatically detects word boundaries from camelCase, separators (hyphens, underscores, dots, slashes), and whitespace.
- Supports 11 case styles commonly used in programming, CSS, file paths, and documentation.
- Everything runs in your browser — no data is sent over the network.
Tips & Best Practices
Naming conventions vary by language and context
camelCase: JavaScript variables, Java methods. PascalCase: TypeScript types, React components, C# classes. snake_case: Python, Ruby, Rust, database columns. SCREAMING_SNAKE_CASE: constants in most languages. kebab-case: CSS classes, HTML attributes, URL slugs. Using the wrong convention breaks linter rules and team consistency.
Acronyms in PascalCase are inconsistent across ecosystems
Should it be XMLParser or XmlParser? HTTPSConnection or HttpsConnection? Go uses XMLParser (all caps for acronyms). C#/.NET uses XmlParser (only first letter capitalized). JavaScript/TypeScript has no consensus. Pick one convention per project and enforce it with a linter rule.
Database column names: snake_case is safest
SQL is case-insensitive by default, but PostgreSQL lowercases unquoted identifiers. A column named userId becomes userid unless quoted. snake_case (user_id) avoids this trap entirely and is the standard convention in PostgreSQL, MySQL, and SQLite. ORMs like Prisma and Drizzle handle the mapping to camelCase in your application code.
Use your ORM's naming strategy instead of manual conversion
Prisma's @@map and @map, TypeORM's namingStrategy, and Sequelize's underscored option automatically convert between camelCase code and snake_case database columns. This eliminates manual case conversion bugs and keeps your codebase consistent.
Frequently Asked Questions
What are the common case conventions in programming?
When should I use camelCase vs snake_case?
How do I convert variable names between cases in bulk?
Related Convert Tools
OpenAPI to TypeScript
Convert OpenAPI 3.x and Swagger 2.0 specs to TypeScript interfaces and types with $ref resolution, allOf/oneOf/anyOf, enums, and API operation types
JSON to Zod Converter
Convert JSON or JSON Schema to Zod validation schemas with $ref resolution, allOf/oneOf/anyOf, enum, format constraints, and required/optional fields
GraphQL to TypeScript
Convert GraphQL SDL schemas to TypeScript interfaces, types, enums, unions, and operations
TypeScript to JavaScript
Convert TypeScript to JavaScript — strip types, interfaces, enums, generics, and access modifiers to get clean JS output