Constant Case Converter

Enter text to convert it to CONSTANT_CASE.

How to use

  1. Enter your values in the fields above.
  2. Press Calculate to see your result instantly.
  3. Use the Share button to copy a link to your result.

About this calculator

CONSTANT_CASE (also called UPPER_SNAKE_CASE) writes identifiers as all-uppercase words separated by underscores, such as MAX_RETRY_COUNT or API_BASE_URL. Converting to it means splitting the input on spaces, hyphens, underscores, and camelCase word boundaries (the point where a lowercase letter meets an uppercase one), then uppercasing each word and rejoining them with underscores.

This naming convention is a long-standing style-guide rule in languages like C, Java, Python, and JavaScript, where it signals that an identifier is a compile-time constant or an enum value — distinguishing it at a glance from ordinary camelCase variables or PascalCase types.

Paste any text, identifier, or phrase and this tool normalizes it into valid CONSTANT_CASE, useful when renaming variables, generating environment variable names, or converting data between naming conventions.

Was this helpful?

Comments (0)

  • Be the first to comment.

Popular calculators

All Calculators