Parse .env with typed values
Input
NAME="Ada"
EMPTY=
ENABLED=trueExample output
{
"NAME": "Ada",
"EMPTY": "",
"ENABLED": true
}Convert between dotenv-style assignments and flat JSON objects with a documented subset parser, entirely in your browser. Quoted, single-quoted, and unquoted values are supported with a small escape set; there is no variable or command interpolation, comments do not round-trip, and prototype keys are rejected.
| Accepted input | .env assignment text for env-to-JSON; a flat JSON object for json-to-env |
|---|---|
| Supported values | Double-quoted, single-quoted, and unquoted values with newline, carriage-return, tab, quote, and backslash escapes |
| Dialect subset | Full-line and unquoted inline comments, export prefixes, and duplicate last-wins; no interpolation, no multiline values |
| Max input size | 2 MB |
| Execution deadline | 2 s |
| Processing location | Browser-only sensitive handling: inputs and results stay in memory, never in persistent storage |
Input
NAME="Ada"
EMPTY=
ENABLED=trueExample output
{
"NAME": "Ada",
"EMPTY": "",
"ENABLED": true
}Input
{"NAME":"Ada","EMPTY":"","ENABLED":"true"}Example output
NAME=Ada
EMPTY=""
ENABLED=trueVariable references and command substitutions are kept as literal text. The parser implements a dotenv subset and never expands values.
Full-line comments are skipped and unquoted inline comments are stripped, so converting back to .env will not restore them.
A quote opened on one line must close on the same line; unterminated quoted values fail with a line-numbered error instead of reading further lines.
Keys such as __proto__, constructor, and prototype are rejected, reverse conversion requires a flat object, and duplicate keys resolve last-wins with a warning.
KEY="a" # c is not treated as a quoted value with a comment; the comment is stripped but the surrounding quotes are kept literally. Remove the comment or use an unquoted value when you need comment stripping.
With quoteStyle none, embedded CR/LF are replaced with spaces rather than escaped; use auto or always to preserve them as \n escapes.
JSON Formatter
Prettify, indent, and format JSON strings with customizable indentation and key sorting.
JSON Validator
Validate JSON syntax, inspect structure, and diagnose syntax errors with line and column diagnostics.
Text Diff / Compare
Compare two text files, code snippets, or configuration payloads line-by-line, word-by-word, or as a unified patch.
JSON ↔ YAML Converter
Convert bi-directionally between JSON and YAML with strict alias and cycle protection, custom indentation, and swap support.
Quoted values always stay strings. Unquoted true, false, and numeric strings become native JSON types only when number and boolean parsing is enabled; otherwise everything converts as a string.
Double quotes support backslash escapes for newlines, tabs, quotes, and backslashes; single quotes are literal; unquoted values allow trailing inline comments. Reverse conversion quotes values automatically when they contain spaces, hashes, quotes, or equals signs.
No. Full-line comments are ignored and unquoted inline comments are stripped during parsing, so comments are lost on conversion to JSON and never regenerated.
No. Values must fit on one line: an unterminated quote produces an error naming the line. Split long values or pre-join them before converting.
No. The tool is marked sensitive, so inputs and results stay in memory and are not written to browser storage, URLs, or a processing server. Copying, downloading, or handing results to another tool are explicit actions you control. Successful conversion says nothing about whether the output is safe to source in a shell.