Direction
Indent
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
Keep going