ENV / Properties Parser — Convert .env & .properties to JSON
Convert .env or Java .properties key-value text to JSON and back, with a choice of equals or colon delimiter, quote and escape handling, and live validation.
ENV / Properties Parser — Convert .env & .properties to JSON — ENV / Properties Parser turns .env files and Java-style .properties text into clean JSON, and converts a flat JSON object back into key-value lines. It strips comments, unwraps quoted values, resolves escape sequences like \n and \t, and lets you pick an equals (=) or colon (:) delimiter when going back to text. Every conversion runs entirely in your browser — your secrets and config keys are never uploaded or stored anywhere.
What is ENV / Properties Parser — Convert .env & .properties to JSON?
ENV / Properties Parser is a free, in-browser converter for the simple KEY=VALUE configuration formats used across software projects: the .env files read by dotenv, Docker, and Node.js, and the .properties files used by Java and Spring applications. Developers and DevOps engineers use it to inspect a config file as structured JSON, to hand a .env to a script that expects JSON, or to round-trip JSON settings back into a .env they can paste into a deployment. Choose the direction with the .env→JSON and JSON→.env toggle; when emitting text you can pick the equals or colon delimiter to match dotenv or Java conventions. The parser ignores blank lines and # or ! comments, drops an optional export prefix, splits on the first = or :, unwraps single- or double-quoted values, and unescapes \n, \t, \r, \" and \\ inside double quotes. The read-only output is plain JSON or plain config text you can copy, and a live key count plus character count tells you how much was parsed.
How to use ENV / Properties Parser — Convert .env & .properties to JSON
- Pick a direction with the toggle: .env→JSON to parse a config file, or JSON→.env to emit one.
- Paste your .env / .properties text or a flat JSON object into the Input box.
- Read the converted result instantly in the read-only Output box — it updates as you type.
- Open Settings and choose the equals (=) or colon (:) delimiter for the generated config text.
- Use the Swap button to flip the direction and move the result into the input for a round trip.
- Click Copy to grab the JSON or config text, and watch the key and character counts.
Examples
Parse a .env file into JSON
Input
# database DB_HOST=localhost DB_PORT=5432 APP_NAME="My App"
Output
{
"DB_HOST": "localhost",
"DB_PORT": "5432",
"APP_NAME": "My App"
}Emit JSON back to .env lines
Input
{ "TOKEN": "abc123", "GREETING": "hello world" }Output
TOKEN=abc123 GREETING="hello world"
Java .properties with a colon delimiter
Input
server.port : 8080 log.level : INFO
Output
{
"server.port": "8080",
"log.level": "INFO"
}Frequently asked questions
- What is the difference between .env and .properties files?
- .env files (used by dotenv, Docker, Node.js) and Java .properties files both store simple KEY=VALUE pairs, one per line, with # for comments. The main differences are that .properties also allows a colon (:) as the delimiter and ! for comments, and .env often uses an export prefix. This tool reads both: it splits on the first = or :, strips export and comments, and unwraps quotes.
- How are quoted values and escape sequences handled?
- When parsing to JSON, a value wrapped in matching single or double quotes is unwrapped. Inside double quotes the escapes \n, \t, \r, \" and \\ are resolved to real characters. When emitting text, any value containing a newline, leading/trailing space, the delimiter, # or a quote is automatically wrapped in double quotes and re-escaped so the line round-trips safely.
- Why does JSON→.env say my input must be an object?
- Config files are flat key-value maps, so the JSON→.env direction only accepts a JSON object like { "KEY": "value" }. Arrays, plain numbers, strings, or null cannot become a .env file. Nested objects or arrays in a value are serialized as a JSON string on the line so nothing is lost.
- What happens to comments and duplicate keys?
- Blank lines and lines starting with # or ! are skipped during parsing. If the same key appears more than once, the last value wins, matching how dotenv and most loaders behave. The output preserves the order keys first appear in the input.
- Are my secrets and config uploaded anywhere?
- No. The entire conversion runs 100% client-side in your browser using built-in JavaScript — nothing you paste is uploaded, logged, or sent to any server. That makes it safe to convert .env files full of API keys, database passwords, and tokens.
Related tools
Base32 / Base58 Encode / Decode
Encode text to Base32 (RFC 4648) or Base58 (the Bitcoin alphabet) and decode either one back to text, fully UTF-8 safe and entirely in your browser.
Base64 Encode / Decode
Encode text to Base64 or decode Base64 back to text (UTF-8 safe).
Case Converter & Counter
Change text case and count characters, words and lines.
Code Formatter & Minifier
Beautify or minify HTML, CSS and JavaScript instantly in your browser, with 2-space, 4-space or tab indentation and Terser-powered JavaScript compression.