Camel Case Converter

Paste a variable name, a phrase or a list of names and convert it to camelCase, PascalCase, snake_case, kebab-case, CONSTANT_CASE, dot.case or Title Case. Any style goes in: "max_retry_count" becomes "maxRetryCount", and acronyms are split correctly.

Characters
0
Words
0
Lines
0

Your text never leaves your device.

How to use

  1. Paste one name per line: identifiers in any style, or plain words such as "user first name".
  2. Pick the target style: camelCase, PascalCase, snake_case, kebab-case, CONSTANT_CASE, dot.case or Title Case.
  3. Copy the converted names into your code, database schema or config.

Examples

  • Before
    user first name
    After
    userFirstName
  • Before
    XMLHttpRequest
    After
    xml_http_request
  • Before
    getHTTPResponseCode
    After
    get-http-response-code
  • Before
    first name last name
    After
    first_name last_name

The seven styles

Style Example Typical use
camelCase maxRetryCount JavaScript/TypeScript variables and functions, JSON keys, Java fields
PascalCase MaxRetryCount classes, types, React components, C# methods
snake_case max_retry_count Python, Ruby and Rust variables, SQL columns
kebab-case max-retry-count URLs, CSS classes, HTML attributes, CLI flags, file names
CONSTANT_CASE MAX_RETRY_COUNT constants, environment variables (DATABASE_URL)
dot.case max.retry.count configuration keys, Java properties files, i18n keys
Title Case Max Retry Count labels and column headers generated from field names

Each line is converted separately, so you can paste a whole list of database columns and get matching TypeScript property names back in one step.

Common mistakes

  • Mixing styles in one codebase. A JSON API that returns user_id, userName and Last-Login forces every client to special-case keys. Pick one style per context and convert at the boundary.
  • Getting acronyms wrong by hand. Is it userId or userID, HttpClient or HTTPClient? Style guides differ: Google’s Java and JavaScript guides treat acronyms as words (HttpClient, userId), while .NET keeps two-letter acronyms in capitals (IOStream). The converter writes acronyms as words, which is the more common modern convention.
  • Using kebab-case for code identifiers. Most languages read max-retry-count as max minus retry minus count. Keep kebab-case for URLs, CSS and files.
  • Converting brand names. iPhone, eBay and YouTube contain case changes that look like word boundaries. Check them after converting.
  • Forgetting that SQL folds case. PostgreSQL turns an unquoted MaxRetryCount into maxretrycount. Use snake_case for database columns to avoid quoting every name.

Frequently asked questions

What is camelCase?

camelCase writes several words as one, with no spaces, starting each word after the first with a capital: userFirstName. The capitals in the middle look like the humps of a camel. PascalCase is the same but also capitalizes the first word: UserFirstName.

How are words detected in names like XMLHttpRequest?

The converter splits at separators (spaces, underscores, hyphens, dots) and at changes of case. A run of capitals followed by a lowercase letter is read as an acronym plus a new word, so XMLHttpRequest becomes XML, Http, Request, and getHTTPResponseCode becomes get, HTTP, Response, Code. Digits stay attached to the word before them: base64 encode v2 becomes base64EncodeV2.

Which case style should I use?

Follow the convention of your language: camelCase for variables and functions in JavaScript, Java and Kotlin; PascalCase for classes and types almost everywhere and for methods in C#; snake_case for variables and functions in Python, Ruby and Rust and for SQL columns; CONSTANT_CASE for constants and environment variables; kebab-case for URLs, CSS classes and file names.

Why did "iPhone" become "i_phone"?

A lowercase letter followed by a capital is a word boundary in camelCase, so "iPhone" is read as two words, i and Phone. Brand names with internal capitals (iPhone, eBay, macOS) are indistinguishable from camelCase identifiers. Fix them by hand after converting.

Does it work with non-English letters?

Yes. Letters from any alphabet are kept and case changes work in Cyrillic, Greek and accented Latin. Case mapping ignores the page language on purpose, so the Turkish rules for i and İ never change an identifier.