Convert SCREAMING_SNAKE_CASE to camelCase!

String
Result

Convert SCREAMING_SNAKE_CASE to camelCase!

Is the variable naming in the code you copied from somewhere else different from your code? Don't worry! It converts variables to your desired naming convention!

Turns upper-case names with underscores, such as DATABASE_URL or JWT_SECRET, into camelCase (databaseUrl, jwtSecret). Environment variables and constants are written in SCREAMING_SNAKE_CASE, but once they are loaded into a typed config object in Node.js, Spring or Kotlin, the fields are usually camelCase.

Paste the lines of a .env file, a docker-compose environment block or a list of constants and you get the property names to declare in your config class or schema.

How to use

  1. Select SCREAMING_SNAKE_CASE as the source and camelCase as the target.
  2. Paste your .env lines or constant names into the String box.
  3. Copy the names from Result into your config type, zod schema or @ConfigurationProperties class.

Example

Input (SCREAMING_SNAKE_CASE)
DATABASE_URL=postgres://localhost/app
REDIS_HOST=localhost
JWT_SECRET=change-me
Output (camelCase)
databaseUrl=postgres://localhost/app
redisHost=localhost
jwtSecret=change-me

Each variable name becomes a camelCase key, while the values after = stay the same; change-me is not upper-case, so it is not touched.

Supported features

  • Lowercases the name and capitalizes the letter after each underscore: REDIS_HOST → redisHost.
  • Digits that start with a letter in the same segment work fine: API_V2_URL → apiV2Url.
  • Single-word names without an underscore, such as PORT or DEBUG, are left as they are.

Use cases

Typed config in Node.js

Validating process.env with zod or class-validator usually ends in an object like { databaseUrl, redisHost }. Converting the .env keys gives you the property list to write the schema and the mapping.

Spring Boot properties

Spring maps MAIL_SMTP_HOST to mail.smtp.host and binds it to a camelCase field. Converting the variable names helps when you write the matching @ConfigurationProperties fields.

Notes and limitations

  • References such as process.env.DATABASE_URL are also converted if you paste them, giving process.env.databaseUrl, which no longer points at the real variable. Paste the names or .env lines only.
  • Digit-only segments are joined without a separator: HTTP_2_ENABLED becomes http2Enabled.

FAQ

Why is PORT not converted to port?

The tool recognizes SCREAMING_SNAKE_CASE only when there is at least one underscore. Lowercase single words yourself.

Are leading underscores kept?

Yes. _INTERNAL_FLAG becomes _internalFlag, the usual way to mark a private field in JavaScript and Dart. Remove the underscore yourself if your config class does not use it.