Text Case Converter
Convert text between camelCase, PascalCase, snake_case, kebab-case, UPPER_SNAKE, Title Case, and more. Free online case converter tool.
Related Tools
Markdown → HTML
Convert Markdown to clean HTML instantly. Supports GFM, tables, code blocks, and more.
HTML → Markdown
Convert HTML to clean Markdown instantly. Supports headings, links, lists, tables, and code blocks.
Slug Generator
Generate SEO-friendly URL slugs from any text instantly. Removes special characters and converts spaces to hyphens.
Naming convention conversion is a routine but error-prone task when working across different ecosystems that enforce different identifier styles. camelCase is standard in JavaScript and Java; PascalCase in C# and TypeScript class names; snake_case in Python, Ruby, and SQL; kebab-case in CSS, HTML attributes, and URL slugs; SCREAMING_SNAKE_CASE for constants in most languages.
Developers constantly move identifiers across conventions: renaming database column names from snake_case to camelCase for a JSON API response, converting GraphQL field names to database column names, transforming CSV headers into valid Python variable names, or generating CSS class names from JavaScript object keys.
This tool performs case conversion using pure JavaScript string manipulation: it first tokenizes the input by splitting on whitespace, underscores, hyphens, and camelCase/PascalCase boundaries (detecting transitions between lowercase and uppercase characters), then reassembles the tokens in the target convention. This correctly handles compound words regardless of the input format.
Common Use Cases
Mapping JSON fields to database columns
REST APIs conventionally return camelCase field names (userId, createdAt, firstName), while PostgreSQL and MySQL column names use snake_case (user_id, created_at, first_name). When writing an ORM mapping layer, generating SQL migrations from API schemas, or building a serialization config for libraries like Jackson or marshmallow, bulk-converting between conventions saves significant manual effort.
Generating CSS class names from JavaScript
CSS class names use kebab-case by convention (btn-primary, nav-link, is-active). JavaScript component libraries and CSS Modules use camelCase references internally. Converting a list of component state names or prop names from camelCase to kebab-case produces the CSS class names to define in stylesheets, keeping naming consistent across the JS–CSS boundary.
Creating Python variable names from CSV headers
CSV files exported from Excel, SQL queries, or reporting tools often have headers with spaces and mixed capitalization ('First Name', 'Account ID', 'Total Revenue'). Converting these to valid Python snake_case identifiers (first_name, account_id, total_revenue) is necessary before using them as pandas DataFrame column names or dataclass field names.
Normalizing GraphQL schema field names
GraphQL schemas use camelCase field names by convention. When generating a schema from an existing database using tools like Hasura, PostGraphile, or Prisma, the source column names are snake_case. Previewing the camelCase equivalents of a set of column names confirms that the generated schema will match the naming conventions expected by the frontend team.
How to Use the Text Case Converter
- Enter any text in the left panel — any format is accepted.
- All 8 case formats are generated instantly in the right panel.
- Input can be camelCase, snake_case, kebab-case, or plain words.
- Click "Copy Output" to copy all formats at once.
Supported Formats
- camelCase — for JavaScript variables and functions
- PascalCase — for class names and React components
- snake_case — for Python variables and database columns
- kebab-case — for CSS classes and URL slugs
- UPPER_SNAKE — for constants and environment variables
- Title Case — for headings and titles
- lower case and UPPER CASE