Skip to main content
Back to Tools
Web Tools

Dotenv Converter

Parse .env files and convert between 6 formats: .env, JSON, YAML, shell export, Docker Compose environment, and TOML. Validates syntax, handles quoted values, and preserves comments. Runs entirely in your browser — your data never leaves your machine.

dotenv env converter json yaml shell docker configuration

Published May 29, 2026

All interactive tools run entirely in your browser. Your data never leaves your device.

How It Works

Paste your .env file content and select an output format. The parser extracts key-value pairs, handles single/double-quoted values, inline comments, and empty values, then converts to your chosen format with proper escaping.

Features

  • 6 output formats: .env, JSON, YAML, Shell export, Docker Compose environment block, TOML
  • Quoted values: handles double and single-quoted strings, preserves # inside quotes
  • Inline comments: strips # comment from unquoted values
  • Statistics: shows variable count, comment count, and line count
  • Round-trip safe: .env output can be re-parsed without data loss
  • Proper escaping: each format uses its own escaping rules (YAML quoting, shell single-quotes, TOML backslash escaping)
  • 5 examples: basic env, quoted values, complex config, Docker env, AWS credentials
  • Copy output: one-click copy of converted output
  • Private: runs entirely in the browser — no data transmitted

Use Cases

  • Converting .env files to JSON for application config
  • Generating export statements for shell scripts
  • Creating Docker Compose environment: blocks from .env files
  • Converting between configuration formats for different deployment targets
  • Sharing environment variable templates in a readable format