Zero Signup ToolsFree browser tools

Converter Tools

Properties to Env Converter

Convert Java .properties files to .env and .env back to .properties in your browser. Spring Boot key mapping, escapes, and multi-line values. No signup.

629 chars

Options

Key naming

Spring style maps spring.datasource.url to SPRING_DATASOURCE_URL, the name Spring Boot reads from the environment.

Quoting

Secrets

Keys containing password, secret, token, or similar are flagged. Masking only affects the preview table, not the converted output.

Key mapping preview

Keys

9

Secret-shaped

1

Output bytes

389

.properties key.env keyValue
spring.application.nameSPRING_APPLICATION_NAMEbilling-service
server.portSERVER_PORT8080
spring.datasource.urlSPRING_DATASOURCE_URLjdbc:postgresql://db.example.com:5432/billing
spring.datasource.usernameSPRING_DATASOURCE_USERNAMEbilling
spring.datasource.passwordsecretSPRING_DATASOURCE_PASSWORDs3cr3t:with=special#chars
spring.datasource.hikari.maximum-pool-sizeSPRING_DATASOURCE_HIKARI_MAXIMUM_POOL_SIZE20
app.welcome.messageAPP_WELCOME_MESSAGEHello, and welcome to the billing service
app.label.currencyAPP_LABEL_CURRENCY€ per month EUR
logging.level.rootLOGGING_LEVEL_ROOTINFO

Warnings

No warnings. Input parsed and converted cleanly.

Round-trip note: going from .env back to .properties is not perfectly reversible. The Spring convention cannot tell which underscores were originally dots and which were hyphens, so an underscore always becomes a dot.

Privacy: parsing and conversion both run in your browser. Nothing is uploaded.

How the formats differ

Keys

.properties keys are dot-namespaced and case sensitive (spring.datasource.url). Environment variable names are UPPER_SNAKE and cannot contain dots on most shells, so the Spring relaxed-binding rule maps dots and hyphens to underscores.

Separators and comments

.properties accepts = , : , or whitespace as the key/value separator and treats both # and ! as comment markers. .env uses = only and # for comments. Both are handled when parsing.

Multi-line values

.properties continues a value when a line ends with a backslash and strips the leading whitespace of the next line. .env wraps a multi-line value in quotes. The converter normalizes a continued value to a single quoted .env value and back.

Escapes

.properties uses \t \n \r \f \\ and \uXXXX, and the standard store format keeps the file ASCII by escaping non-ASCII characters. The .env side uses \n \r \t \\ inside double quotes. Values are decoded on input and re-escaped for the target format.

How to use

  1. Pick a direction at the top: .properties to .env or .env to .properties. Use Swap direction to feed the current output back as the new input.
  2. Paste your file into the input box, or click Load sample to start with a realistic Spring Boot example that exercises dotted keys, : separators, comments, line continuations, and Unicode escapes.
  3. Choose a key naming style. Spring style maps spring.datasource.url to SPRING_DATASOURCE_URL and back; pick Keep keys verbatim if your consumer reads the dotted names directly.
  4. Read the key mapping preview to confirm each key and value converted as expected. Toggle Mask likely secrets to hide values that look like passwords or tokens.
  5. Click Copy output to copy the converted file. Check the warnings panel for duplicate keys, unterminated quotes, or keys that collide after mapping. Everything runs in your browser.

About this tool

Properties to Env Converter is a two-way converter between Java-style .properties files and dotenv-style .env files. It exists for one common job: moving the configuration of a Spring Boot or plain Java service into an environment-driven, containerized runtime, and back again. The two formats look similar but differ in ways that break a naive copy and paste. A .properties file uses dot-namespaced, case-sensitive keys like spring.datasource.url, accepts =, :, or whitespace as the key and value separator, treats both # and ! as comment markers, continues a value onto the next line when a line ends with a backslash, and encodes special characters with java.util.Properties escapes including the four-digit \uXXXX form. A .env file uses UPPER_SNAKE keys that cannot contain dots on most shells, allows an optional export prefix, quotes values that contain spaces or special characters, and supports \n, \r, \t, and \\ inside double quotes. This tool parses each format properly rather than with a single regular expression: the .properties parser honors backslash line continuations, escaped separators such as \= and \:, and the full escape table, while the .env parser handles double and single quoting, multi-line quoted values, the export prefix, and end-of-line comments. Going from .properties to .env it applies the Spring Boot relaxed-binding convention, replacing dots and hyphens with underscores and upper-casing the key, so spring.datasource.url becomes SPRING_DATASOURCE_URL, which is exactly the name Spring Boot reads back from the environment. Going the other way it lower-cases and maps underscores to dots. A Keep keys verbatim option is available when the consumer reads dotted names directly. Every parsed key is shown in a preview table next to its mapped name and value, secret-shaped keys such as PASSWORD, JWT_SECRET, and CLIENT_SECRET are flagged and can be masked for screen-sharing, and a warnings panel reports duplicate keys, unterminated quotes, empty keys, and any keys that collide after mapping. Because the inverse mapping cannot know whether an underscore was originally a dot or a hyphen, the tool is honest that .env to .properties is not perfectly reversible. Everything runs locally in your browser, so your configuration files and the secrets inside them are never uploaded.

Free to use. Works in your browser. No signup, no login.

Related tools

You may also like

All tools
All toolsConverter Tools