Convert JSON configuration objects to .env files, Docker env, or Kubernetes ConfigMaps.
Free online JSON to .env converter. Paste a JSON configuration object and convert it to a .env file, Docker environment variable format, YAML, or Kubernetes ConfigMap in one click. Automatically flattens nested objects using double-underscore notation (e.g., database.host → DATABASE__HOST). Sort keys alphabetically and download the result. Runs entirely in your browser — no data is ever sent to a server.
Keywords: json to env, json to env converter, json to env file, json to dotenv, json to .env, json to env online, convert json to env, json config to env, json to docker env, json to kubernetes configmap, json to environment variables, json to k8s configmap, nested json to env, json to env file generator
Tags: json, env, dotenv, docker, kubernetes, converter, config
Paste your JSON configuration object into the input panel on the left.
Select the output format: .env file, Docker environment file, Kubernetes ConfigMap YAML, or plain YAML.
Configure flattening options: separator for nested keys (default: double underscore __) and key case (SCREAMING_SNAKE_CASE or preserve).
Optionally add a prefix to all generated keys for namespace isolation (e.g., APP_ or SERVICE_).
Click "Convert" or press ⌘↵, then copy the output or download it as a .env file.
Converts JSON configuration objects to .env format (KEY=value pairs) for use with dotenv and similar tools
Docker environment file output (--env-file compatible) with proper quoting of values containing spaces
Kubernetes ConfigMap YAML generation with correct apiVersion, kind, and data structure
Plain YAML output for use with Ansible, GitHub Actions, and other YAML-based configuration systems
Nested JSON objects flattened using configurable separator — default double underscore (DATABASE__HOST)
Automatic SCREAMING_SNAKE_CASE conversion for environment variable naming conventions
Optional key prefix for namespace isolation across multiple services (e.g., APP_DATABASE__HOST)
Alphabetical key sorting for consistent, diff-friendly configuration files
Handles string, number, boolean, and null values with appropriate type coercion to strings
Runs entirely in your browser — your configuration data is never uploaded to any server
Download output directly as a .env file with correct MIME type
Keyboard shortcut ⌘↵ to convert, ⌘⇧C to copy output