Config Converter

Convert between flat .env, properties, INI and JSON config formats in your browser.

  • Runs locally in your browser
  • No upload required

Try it

File
config.json
Keys
NODE_ENV, PORT
Sections
none
Content
{ "NODE_ENV": "production", "PORT": "3000" }
{
  "NODE_ENV": "production",
  "PORT": "3000"
}

Supported formats

Input
text
Output
text

Privacy

Runs entirely in your browser. Your input is never uploaded, stored, or sent to a third party.

Processing
In your browser
Privacy level
Browser only

Converted 2 key(s) from dotenv to json.

How it works

  • Parsed the dotenv document into an ordered key/value list.
  • Validated each key against the flat config key grammar.
  • Serialized the mapping as json, preserving key order.
  • Comments are not preserved across formats that cannot express them.
  • Only flat key/value documents are supported; nested JSON objects beyond one level are rejected.

Methodology

  1. Parse the source document into an ordered list of key/value pairs, tracking INI sections.
  2. Validate every key against the flat config key grammar and reject nested structures.
  3. Serialize the pairs for the target format, preserving order and section membership.

Usage

  1. Choose the source and target formats.
  2. Paste the flat key/value document.
  3. Copy the converted output.

Examples

These are examples, not current values: they use fixed inputs, while the interactive tool computes live results in your browser.

.env to JSON

jsonSelect to copy
{
  "source": "dotenv",
  "target": "json",
  "text": "NODE_ENV=production\nPORT=3000"
}

INI to properties

jsonSelect to copy
{
  "source": "ini",
  "target": "properties",
  "text": "[server]\nhost=db.internal\nport=8080"
}

Limitations

Flat by design

Flat configs are a sequence of key=value pairs, optionally grouped into INI sections. Keeping the converter flat lets it round-trip keys without inventing a schema, and it stays honest about what it cannot represent.

Frequently asked questions

Can I convert nested YAML or TOML?
No. Use the dedicated JSON/YAML converters for nested documents; this tool is intentionally limited to flat key/value configs.
Are comments preserved?
No. Parsing keeps keys and values; comments are dropped because the target format may not support the same comment syntax.

Sources

  1. Java Properties file format — Oracle
  2. INI file format — Wikipedia