ENV to JSON Converter
Read setting pairs and export them, keeping text values and explaining ENV format differences.
Comments, export, and quoted values are read. Values stay text and ${VARIABLES} are not expanded. Paste sample values, not real secrets.
Your result
Paste a .env file or a JSON object and the converted text appears here.
How to use it
- Choose the direction.
- Paste the text or press Try a sample.
- Copy the result or download it.
Examples
- A comment and export# c NAME=Ada export CITY="Cairo" {"NAME": "Ada", "CITY": "Cairo"}
- A comment after a valueDEBUG=true # local {"DEBUG": "true"}
- From JSON{"APP_NAME": "Smart Shop"} APP_NAME="Smart Shop"
Tool details and privacy
Paste a .env file to get a JSON object, or paste a flat JSON object to get NAME=value lines. Swap converts the result back again.
You sometimes need settings as JSON for a hosting service or a test, or the other way round.
Options
- A comment after an unquoted value is removed; # inside quotes stays.
- When a name repeats the last value wins, and a note lists the repeated names.
- When writing ENV, a value with spaces or symbols is quoted.
Limits
- Values stay text and ${VARIABLES} are not expanded.
- Nested JSON (lists or objects) is refused when writing ENV, with the field name.
Privacy
What you type stays in your browser. Nothing is uploaded or saved on the server.
Questions
Does true become a boolean?
No. It stays "true", as most loaders read it.
What about multi-line values?
A double-quoted value may span several lines.
Should I paste real secrets?
Sample values are safer, although nothing is uploaded.
Is the text uploaded?
No.