CONSTANT_CASE Converter

Paste any text and instantly convert it to CONSTANT_CASE (SCREAMING_SNAKE_CASE) for use as programming constants or environment variables.

0 lines

Conversion Examples

maxRetryCount MAX_RETRY_COUNT
my-api-key MY_API_KEY
user profile url USER_PROFILE_URL
HTTPStatusCode HTTP_STATUS_CODE
database_host_name DATABASE_HOST_NAME
react.app.base_url REACT_APP_BASE_URL

Summary

Paste any text and instantly convert it to CONSTANT_CASE (SCREAMING_SNAKE_CASE) for use as programming constants or environment variables.

How it works

  1. Paste or type your text into the input box.
  2. The tool splits words on spaces, hyphens, underscores, dots, slashes, and camelCase boundaries.
  3. All non-alphanumeric characters are removed.
  4. Words are joined with underscores and converted to uppercase.
  5. Click Copy to copy the result to your clipboard.

Use cases

  • Naming constants in JavaScript, Python, Java, or C/C++ source files.
  • Formatting environment variable names for .env files and Docker configs.
  • Generating database column names for legacy schemas that use UPPER_SNAKE conventions.
  • Converting config keys to the correct format for shell scripts.
  • Batch-converting a list of property names to constant declarations.
  • Standardizing naming across a codebase during a refactor.

Frequently Asked Questions

Last updated: 2026-06-09 · Reviewed by Nham Vu