How to use the .env to JSON converter
Paste an .env file and get a JSON object back. It helps when settings have to move into another format, when a deploy tool or CI form expects JSON, or when you simply want to see at a glance which keys a teammate's environment file contains.
These are the rules this tool follows. Blank lines and lines starting with # are skipped. A leading export is removed. Wrapping double or single quotes are stripped, but escapes such as \n, \t and \\ are turned into real characters only inside double quotes; single-quoted values stay exactly as written. In an unquoted value, a # that follows whitespace starts a comment and is cut, so abc#123 with no space keeps its hash.
Every value becomes a string, without exception. Environment variables are strings by nature, so 5432 and false come back quoted. If you want real numbers and booleans, use the dedicated key=value converter instead. When the same key appears twice, the later line wins.
The limits are stated plainly too. A ${OTHER_KEY} reference is never expanded; it is kept literally and the result tells you how many values contained one. Values spread over several lines are not supported either. Everything is processed in your browser and nothing is uploaded, but still treat a file holding real production keys with care.
Frequently asked questions
Environment variables carry no type information, so every value is a string. This tool keeps that convention instead of guessing.
No. Expansion rules differ between runtimes and a wrong guess is risky, so the reference is left literal and only counted for you.
Escapes such as \n become real line breaks only inside double quotes. A single-quoted value is preserved exactly as it is written.