Data Tools

Convert .env Files to JSON

Convert .env text to JSON in your browser. Comment lines are ignored. Optionally nest keys on underscores and coerce numbers or booleans—useful for frontend config, Docker, and CI key maps.

EnvironmentJSONConfig

Favorite this tool

No favorite storage mode has been selected.

Quick actions

Copy this tool URL or open the system share sheet on a supported device.

Use cases

  • Turn a local .env into a JSON config snippet
  • Prepare key maps for deployment
  • Compare flat and nested config shapes

How to use

  1. Paste .env text
  2. Optionally enable underscore nesting and type coercion
  3. Convert and copy the JSON

Example input and output

.env

DB_HOST=127.0.0.1
DB_PORT=5432

JSON

{
  "DB_HOST": "127.0.0.1",
  "DB_PORT": 5432
}

FAQ

How are comment lines handled?

Lines starting with # are ignored and are not written into the JSON.

What does underscore nesting mean?

When enabled, keys are split on underscores into nested objects—for example DB_HOST can become a nested structure for grouped reading.

Tools

Related tools

Continue with another translated tool for a nearby task.

Properties ↔ YAML

Convert Java Properties and YAML Online

Available

Convert between Java Properties and YAML in your browser. Expand dotted keys such as spring.jpa.x=1 into nested YAML, or flatten YAML back to properties—useful for Spring config migrations.

Config Java YAML

JSON Formatter

JSON Formatter and Validator Online

Available

Format, minify, sort, and validate JSON in your browser. Parsing errors include location details, and your data never leaves the page.

JSON Formatter Developer

YAML to JSON

YAML to JSON Converter Online

Available

Convert YAML to formatted JSON in your browser with two-space indentation by default. Parse failures show the reason, and conversion stays local—useful for config debugging and API handoffs.

YAML JSON Converter