Convert environment variables into structured formats.
Runs locally in your browser. No uploads.
Parse .env to JSON/YAML (dotenv-compatible)
This .env parser converts KEY=VALUE pairs into JSON or YAML directly in your browser. It supports export KEY=VALUE, quoted values (single/double), multiline values, and unquoted inline # comments. Sensitive keys are highlighted and you can mask values for safer viewing.
Drag & drop a .env file here, or click to choose (max 1MB)
Choose file
Examples:
Parses automatically as you type. Supports export KEY=value, quoted values, multiline values, and inline # comments for unquoted values (comment starts when `#` appears after whitespace, e.g. KEY=VAL # comment).
Step-by-step chains that connect related tools for common tasks.
Migrate .env variables to a structured config format
Paste your .env file contents (use dummy values for any real secrets) into the input field.
Copy the JSON output and validate that all expected variables are present and correctly parsed.
Parse and inspect cookie strings alongside auth tokens with Cookie Parser if your .env includes session or auth cookie values.
Advertisement
Frequently Asked Questions
What is a .env file and how is it parsed?
A .env file stores environment variables as KEY=VALUE pairs, one per line. Lines starting with # are comments; blank lines are ignored. Values can be quoted (single or double) to preserve whitespace or special characters. This parser extracts all variables and outputs them as structured JSON or as an object you can inspect and copy.
Are my .env variables safe to paste here?
This tool runs entirely in your browser — your environment variables never leave your device. However, treat .env files as sensitive data: they typically contain database credentials, API secrets, and auth tokens. Use placeholder values when testing or demonstrating, and never commit real .env files to version control.
How does the parser handle variable expansion?
Basic variable expansion (VAR=$OTHER_VAR or VAR=${OTHER_VAR}) is resolved when the referenced variable appears earlier in the file. Circular references are flagged. The output shows both the raw value and the expanded value so you can verify interpolation is working as expected.
Can I convert .env variables to a different config format?
Yes. The parser outputs JSON by default, which you can reformat as YAML, TOML, or any other config format. This is useful when migrating from .env files to a secret manager, Kubernetes secrets, or a CI/CD environment variable store that expects JSON or YAML input.