CONSTANT_CASE is all capitals with underscores between words: MAX_RETRIES, API_BASE_URL, DEFAULT_TIMEOUT_MS. It is also called SCREAMING_SNAKE_CASE or UPPER_SNAKE_CASE, and it is the standard way to write constants in JavaScript, Python, Java, C, Rust and many other languages.
The all-caps shape is a signal to the reader: this value is fixed, do not change it. Environment variables follow the same pattern for a historical reason, since Unix shells use uppercase names, and so do .env files, Dockerfiles and CI settings.
Using the tool
Paste a phrase, or a list of them, one per line. Each line is changed on its own and the output keeps the order. All of these produce MAX_RETRY_COUNT: max retry count, maxRetryCount, max-retry-count, Max Retry Count.
Separators and capital-letter humps count as word breaks. Everything is uppercased and joined with a single underscore, however many spaces or punctuation marks there were between words.
Careful with the edges
A name that is already all capitals with no separators, like MAXRETRIES, has nothing to split on and stays as one word. If a phrase begins with a digit, you will get a name starting with a digit, such as 3D_MODEL_PATH, which is not a legal identifier in most languages; add a prefix in that case. Punctuation is dropped, so “user’s token” becomes USER_S_TOKEN because the apostrophe splits the word. Clean contractions out first using remove special characters.
Conventions that come with it
Environment variables are often namespaced with a prefix, for instance STRIPE_SECRET_KEY rather than SECRET_KEY, so they do not collide when several services share a machine. Constants inside code are usually grouped by what they belong to. Whether the constant lives in a module, a class or a config file, the name should say what it holds, including units: TIMEOUT_MS is clearer than TIMEOUT.
Never commit real secrets just because they have a tidy name. The name is only the label.
Other styles
The lowercase version of the same shape is snake_case. For class names, use PascalCase; for variables in JavaScript and Java, camelCase. If you only need capitals with spaces left alone, the uppercase converter does that, and the case converter lines up every style so you can pick one.
How the convention differs between languages
Languages enforce this to very different degrees. In Python it is only a convention, because nothing stops code from reassigning MAX_RETRIES. In JavaScript, const prevents reassignment but not changes inside an object, and teams usually reserve capitals for true fixed values rather than every const. Java uses static final fields in capitals, and Go avoids the style and uses mixed case. For configuration, the twelve-factor app approach keeps settings in environment variables named in this style, which is why a .env file full of DATABASE_URL and SECRET_KEY entries is so common.