ENV to JSON

No upload · runs in your browser
Direction
Indent
Paste .env or JSON
0 characters
Converted

Runs entirely in your browser, nothing is uploaded.

How it works

ENV to JSON : .env Files to JSON and Back

Turn a .env file into JSON, or JSON back into .env lines. export prefixes and inline # comments are handled, and the split is on the first = only.

What this does
  • Splits on the first = only, so a connection string holding p@ss=word survives intact
  • Single-quoted values stay literal; double-quoted ones get \n and \t expanded
  • A quoted value may run across several lines, and the parser follows it to its closing quote
  • Going the other way, a nested object is serialised to compact JSON and stored as one string
FAQ

The parser is JavaScript inside this tab and it makes no request of any kind, there is no endpoint for a .env file to reach, and closing the tab discards it. That matters more here than on most pages, because a .env file is usually the single most sensitive text file in a repository: database URLs, signing secrets, API keys for services that bill by the request.

Keep going