EnvSiftView EnvSift on GitHub
Open tool navigation
All tools

Format Converter

Convert a flat ENV or JSON object into normalized ENV, JSON, shell exports, or a Docker Compose environment block.

Comments are ignored in generated output.

Practical guide

How to convert environment variable formats

Move a flat configuration between dotenv, JSON, shell export, and Docker Compose syntax while keeping every value in the browser.

  1. 1Select ENV or flat JSON as the input format and paste or load the source.
  2. 2Choose ENV, JSON, shell exports, or Docker Compose for the output.
  3. 3For Compose, choose literal values or references to host environment variables.

What this tool handles

  • ENV and shell export input
  • Flat JSON objects with string, number, boolean, or null values
  • Normalized dotenv and formatted JSON output
  • Shell export statements and Docker Compose environment blocks
  • Unsafe JSON integers and nested values rejected to prevent data loss

Example

ENV input
PORT=3000
DEBUG=true

JSON output
{
  "DEBUG": "true",
  "PORT": "3000"
}

Frequently asked questions

Does JSON conversion preserve value types?

ENV values are strings, so ENV-to-JSON output uses strings. JSON input values are converted to their string representation when targeting an ENV format.

Are nested JSON objects supported?

No. Environment variables are flat key-value pairs, so nested objects and arrays are rejected instead of being flattened ambiguously.

What is the difference between Docker value modes?

Literal mode writes the values into the Compose block. Reference mode writes expressions such as ${PORT} so Compose reads the host variable at runtime.