Case Converter Tools

Constant Case Converter

Turn a phrase into CONSTANT_CASE for constants and environment variables.

PrivateYour text is processed on your device and never uploaded.
UPPER with underscoresfor constants

Tokens are upper-cased and joined with underscores, the usual style for environment variables and constants.

A phrase
CONSTANT_CASE
0 chars · 0 words
Example: max retry count

Constants and environment variables are written in upper case with underscores, which is fiddly to type.

This converter capitalises the words and joins them with underscores to produce CONSTANT_CASE at once.

How to use Constant Case Converter

  1. Paste the phrase you want as a constant.
  2. Constant Case Converter upper-cases the words and joins them with underscores.
  3. Copy the CONSTANT_CASE name into your code or environment file.

Use cases

Good to know

Constant Case Converter upper-cases every token and joins them with underscores, so max retry count becomes MAX_RETRY_COUNT. Spaces and hyphens collapse to underscores and punctuation is dropped. It is the conventional style for constants and environment variables, and existing casing is split before the tokens are rejoined.

Frequently asked questions

What is CONSTANT_CASE for?

It is the usual style for constants and environment variable names.

Does it use underscores?

Yes. Words are joined with single underscores and every letter is capitalised.

Is it safe for environment variables?

Yes. Uppercase letters, digits and underscores match common environment-variable rules.

Related Case Converter Tools