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.
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 key | Value |
|---|---|---|
| spring.application.name | SPRING_APPLICATION_NAME | billing-service |
| server.port | SERVER_PORT | 8080 |
| spring.datasource.url | SPRING_DATASOURCE_URL | jdbc:postgresql://db.example.com:5432/billing |
| spring.datasource.username | SPRING_DATASOURCE_USERNAME | billing |
| spring.datasource.passwordsecret | SPRING_DATASOURCE_PASSWORD | s3cr3t:with=special#chars |
| spring.datasource.hikari.maximum-pool-size | SPRING_DATASOURCE_HIKARI_MAXIMUM_POOL_SIZE | 20 |
| app.welcome.message | APP_WELCOME_MESSAGE | Hello, and welcome to the billing service |
| app.label.currency | APP_LABEL_CURRENCY | € per month EUR |
| logging.level.root | LOGGING_LEVEL_ROOT | INFO |
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
- 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.
- 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.
- 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.
- 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.
- 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
Env to JSON Converter
Two-way dotenv and JSON converter with multi-line value, secret masking, and nested key support.
Open tool
ConverterProperties to JSON Converter
Two-way converter between Java .properties files and JSON, with dotted nesting and full escape handling.
Open tool
DeveloperEnv File Formatter
Sort, align, dedupe, and tidy a single .env file with quote-aware formatting.
Open tool
DeveloperDotenv Diff Checker
Side-by-side .env diff with missing keys, value changes, and secret masking.
Open tool
DeveloperEnv Example Generator
Generate a committable .env.example from your real .env with secrets replaced by placeholders.
Open tool