Constant Case Converter
Enter text to convert it to CONSTANT_CASE.
Result
How to use
- Enter your values in the fields above.
- Press Calculate to see your result instantly.
- 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?
Popular calculators
Loan Calculator
Monthly payment, total interest and full amortization schedule.
Percentage Calculator
Percent change, percent of, and ratio calculations.
Discount Calculator
Calculate final price, savings, and discount amount.
BMI Calculator
Body mass index from height and weight (metric or imperial).
Age Calculator
Compute your exact age in years, months and days from a birth date.
Compound Interest Calculator
Calculate the final amount and interest earned with compounding.
All Calculators
No calculators found
Comments (0)