Utilo

Variable Name & Case Converter

Convert text into variable names: camelCase, PascalCase, snake_case, kebab-case, CONSTANT_CASE, dot.case, Title Case and more. Perfect for naming variables, functions and files.

What this case converter does

Every language and framework has its own naming conventions: camelCase for JavaScript variables, PascalCase for classes and React components, snake_case in Python and SQL, kebab-case in URLs and CSS, and CONSTANT_CASE for environment variables. This tool splits any input into words, whatever its current style, and shows it in all common conventions at once so you can copy the exact form you need.

How to use it

  1. Type or paste one or more names into the input, one per line.
  2. Any style is accepted: get user by id, getUserById, get_user_by_id or GET-USER-BY-ID.
  3. Each card shows the result in one convention. Click Copy on the one you need.
  4. Multiple lines are converted line by line, which is handy for renaming a whole list of fields.

Practical examples

  • API to database: convert JSON fields like createdAt and userId to created_at and user_id for a SQL migration.
  • Component names: turn a design spec's "primary action button" into PrimaryActionButton for a React file and primary-action-button for its CSS class.
  • Environment variables: convert stripe secret key to STRIPE_SECRET_KEY.
  • URL slugs: generate how-to-compress-images from a heading.

Tips and edge cases

  • Acronyms are split by case changes: parseHTTPResponse becomes parse, http, response. Many style guides prefer parseHttpResponse for readability.
  • Numbers stay attached to the preceding word, so version2Update becomes version2_update.
  • Accented letters are preserved. If you need ASCII-only identifiers, remove diacritics first.
  • Leading underscores or dollar signs used for private members are treated as separators and dropped.
  • Up to 2,000 lines are converted live; the work is deferred so typing remains smooth.

Frequently asked questions

Which case should I use for JavaScript?

camelCase for variables and functions, PascalCase for classes, types and React components, and CONSTANT_CASE for true constants. This matches most popular style guides.

What is the difference between kebab-case and snake_case?

kebab-case separates words with hyphens and is used in URLs, CSS classes and file names. snake_case uses underscores and is common in Python, Ruby and database columns. Hyphens are not valid in most programming language identifiers.

Is Title Case the same as PascalCase?

No. Title Case keeps spaces between capitalised words and is meant for headings. PascalCase removes the spaces and is meant for identifiers.

Does the tool handle non-English text?

Yes, words separated by spaces or punctuation are split correctly in any script. Case conversion applies only to scripts that have uppercase and lowercase letters.

Yes. All processing happens directly in your browser using JavaScript, Web Workers and Web APIs. Nothing you type, paste or upload is sent to our servers.