Overview
Converts .env files into JSON, Java .properties, YAML, shell export lines, or docker env-file format - locally, in your browser. Comments, blank lines, 'export' prefixes, single and double quotes, double-quote escape sequences, and inline comments are parsed the way real dotenv libraries treat them, and any line that does not parse is reported by line number rather than silently dropped.
How It Works
Paste a .env file on the left and pick the output format. JSON gives you a ready object for code or tooling; Java .properties escapes keys for the java.util.Properties format; YAML uses quoted scalars so values with special characters survive; shell export lines are ready to paste into a terminal or a script; and docker env format is the plain KEY=value list that docker run --env-file and compose expect. Warnings appear for malformed lines.
Step-by-Step Usage Guide
- Paste your .env file - the parse runs live.
- Check the warnings panel: any malformed line is listed with its line number.
- Pick the output format for the system you are feeding: JSON, properties, YAML, shell, or docker.
- Copy the output, and keep the original .env as the source of truth.
Technical Specifications & Standards
The parser follows the conventions the major dotenv libraries converged on. Lines are trimmed; blank lines and # comments are skipped; an optional 'export ' prefix (for shell-compatible files) is stripped. The key must match the usual identifier pattern - letters, digits, underscores, and dots after the first character - and keys outside that pattern are warned about rather than accepted, because a typo like A B=1 would otherwise become a silent misconfiguration. Values may be single-quoted (taken literally, no escape processing), double-quoted (with \n, \t, \", and \\ interpreted, matching node-dotenv), or bare - and bare values have inline comments (a # preceded by whitespace) stripped, the behaviour node-dotenv standardised. Each output format escapes appropriately rather than naively: the properties writer escapes backslashes and the :, =, space characters that are syntactically meaningful in that format, and the shell writer quotes values and escapes the characters that double quotes would otherwise interpret, so a value like pass"word does not break your terminal.
Targeted Use Cases
- Feeding a .env file to a Java service that reads application.properties instead.
- Loading configuration into a script that expects shell exports, or into code that wants a JSON object.
- Migrating config between systems: docker env-file to Kubernetes ConfigMap YAML via the YAML output.
- Auditing an inherited .env file - the warnings surface lines that a stricter parser would reject.
Notes & Gotchas
- Never commit real .env files - convert a sanitised copy; this tool runs locally precisely so secrets need not leave your machine.
- Quote values that contain spaces, #, or quotes in your .env source; bare values lose anything after an inline #.
- Prefer double quotes when you need \n or tab in a value, single quotes when you want every character literal.
- Re-check names: keys with dots or unusual characters are warned about because some loaders reject them outright.
Frequently Asked Questions
Are my environment variables uploaded anywhere?
No. Parsing and generation run entirely in your browser. .env files contain database URLs and API keys by definition, which is exactly why this tool does no networking.
Why was a line dropped?
Lines without a KEY=VALUE shape (and outside comments) are reported in the warnings with their line number. Common causes are a missing equals sign, a wrapped multi-line value, or a stray copy-paste artifact.
What is the difference between single and double quotes here?
Double-quoted values process escape sequences (\n becomes a newline, \" a quote); single-quoted values are literal. This matches node-dotenv's behaviour and most shell semantics.
Does the JSON output deduplicate keys?
Yes - JSON objects cannot hold duplicate keys, so the last assignment wins. The warnings point at other problems, but duplicate keys are worth scanning for before you convert.