🔒 Runs in your browser — nothing is uploaded✓ Free, no signup
.env Parser & Converter
Paste a .env file to check it and convert it to JSON, YAML, shell exports, docker run flags or Kubernetes env entries — or turn a JSON object into a .env file.
0 characters
Output
When should you use the .env Parser?
- Moving environment variables into Kubernetes, Docker or CI settings
- Finding duplicate or malformed lines in a .env file
- Creating a .env file from a JSON config
How to use the .env Parser
- 1
Paste your .env
Comments, export prefixes, quotes and multi-line values are understood.
- 2
Pick a format
JSON, YAML, shell export, docker run -e, Kubernetes env or a cleaned .env.
- 3
Check warnings
Duplicate keys and invalid lines are listed under the output.
- 4
Or go the other way
Switch to JSON → .env. Nested keys are flattened (db.host → DB_HOST).
Examples
.env to typed JSON
.env
# Database DB_HOST=localhost DB_PORT=5432 API_KEY="abc 123"
JSON
{
"DB_HOST": "localhost",
"DB_PORT": 5432,
"API_KEY": "abc 123"
}Common errors and how to fix them
A line was skipped- Each line must be KEY=value. Keys can only contain letters, numbers, _ . and -, and can't start with a number.
A value was cut at #- Unquoted values end at ' #' (an inline comment). Wrap the value in quotes to keep the # character.
More from Code Formatters & Minifiers
Free tools that run in your browser — no signup, nothing uploaded.
SQL Formatter & Beautifier
Format SQL queries for MySQL, PostgreSQL, SQL Server, SQLite and more.
CSS Minifier & Compressor
Optimize CSS by removing whitespace and comments to accelerate page load time.
JS Minifier & Compressor
Compress JavaScript to improve website speed and performance.
XML Formatter & Validator
Format, validate and minify XML, with errors shown by line and column.
HTML Formatter & Beautifier
Beautify or minify HTML with clean, consistent indentation.
Markdown Editor & Preview
Write Markdown with a live preview and copy the HTML.
HTML to JSX Converter
Convert HTML to valid React JSX — className, style objects and more.
SVG to React Component
Turn SVG markup into a React component with camelCase attributes.
HTML to Markdown Converter
Convert HTML to clean Markdown, including tables and code blocks.
.env Parser FAQ
The dotenv format used by Node, Python, Docker Compose and others: KEY=value, # comments, optional export, single, double and backtick quotes, \n escapes in double quotes and multi-line quoted values.
The last value wins, as in most dotenv libraries, and a warning tells you which key was duplicated.
Only if you tick 'Numbers and booleans as JSON types'. Otherwise every value stays a string, as environment variables always are.
Parsing happens entirely in your browser and nothing is sent anywhere. Still, rotate any secret you've shared somewhere you didn't intend.
Keys are uppercased, nested objects are joined with _ and values with spaces or special characters are quoted.
No. Everything runs in your browser, so your .env file never leaves your device.
