.env Formatter / Validator
Use synthetic values only, not credentials. This website uses Interactive Auto: server-interactive input crosses the Blazor connection; WebAssembly runs on-device. This is not a client-only privacy guarantee.
Dotenv dialect, conversion limits and privacy
Keys are case-sensitive ASCII letters/underscore followed by letters/digits/underscore. Duplicate keys are refused, not overwritten. Optional lowercase export followed by space/tab is preserved when formatting. Assignment order and comments are preserved; blank lines are removed. Spaces/tabs around keys and unquoted values are trimmed; interior whitespace is literal. Empty values are supported. LF, CRLF and CR input lines become LF output with a final newline.
Single quotes are literal (no escapes). Double quotes support only backslash-backslash, backslash-double-quote and backslash-t (tab). Quoted # and = are literal. In unquoted values, # begins a comment only at the start or after space/tab; other # and = are literal. Unquoted quotes/backslashes and trailing text after closing quotes are refused; a trailing comment must have separating whitespace. Formatting always emits escaped double-quoted values.
Multiline values, continuation, dollar signs and backticks in values (even quoted), unknown escapes, NUL/other controls, invalid Unicode and Unicode line separators are unsupported and refused. No shell sourcing, command execution, interpolation, host-variable resolution, network requests, automatic file reads or environment writes occur in the transformation.
JSON conversion accepts only a flat object with unique supported keys and string values; numbers, null, nested objects, arrays, unsupported strings and empty objects are refused. Dotenv to JSON refuses all comments and export markers to avoid loss. JSON preserves value meaning and order, not original quoting, blank lines or source layout. JSON semantic errors identify line 1 (object-level); syntax errors identify the parser line. Output may be longer than the 4096-character input limit.
Ordinary native edits clip before transport at 4098 UTF-16 characters. Oversize edits are refused, never processed as clipped prefixes; input, verdict and stale output/Copy are cleared. Shorten and re-enter text, or Clear. Native limits do not certify hostile programmatic assignments or every IME. Errors never echo supplied keys or values.
No payload logging, telemetry, storage or persistence is added by this tool. Copy is explicit and includes all output values/comments. Website discovery is active; extension/Android metadata is inactive, not hard route denial. This dialect is not a guarantee of compatibility with every dotenv loader; verify your target separately.
.env Formatter / Validator guide
Validate literal dotenv text, format it or explicitly convert string assignments to/from JSON.
Input and limitations
Bounded single-line dotenv dialect or a flat JSON object of strings; 4096 UTF-16 characters, 128 unique assignments.
Check the selected options before using the result. Formatting and conversion do not establish that data is safe or suitable for your application.
How to use .env Formatter / Validator
- Use synthetic values only. Paste text, then choose Validate and format, Convert to JSON or Convert to .env.
- Conversion to JSON refuses comments and export markers instead of silently discarding them.
- Copy explicitly places the complete output on the clipboard. No shell execution or environment expansion is performed.
- Clear removes input, output, verdict and errors.
Example
Use synthetic A='x#=y' and EMPTY= on separate lines. Validate and format emits double-quoted assignments; Convert to JSON emits string values. Comments/export are refused for JSON conversion instead of discarded.
Privacy on the website
The website uses Blazor Auto: interactive processing can run on the server or in your browser, depending on the current session. Do not assume pasted input stays on your device. Use non-sensitive sample data, and never place passwords, tokens or personal data in page URLs.
Search indexing covers public tool descriptions, not your input or generated output. See the privacy policy for website analytics and other data handling.
Related tools
Browse Formatters tools- JSON Formatter - Format, clean, and beautify JSON. Supports custom indentation and removing default or null values. Trailing commas and comments are accepted.
- Line Break Remover - Remove all line breaks from your text to make it a single line.
- XML Formatter - Format and beautify XML. Supports custom indentation, an optional XML declaration, and removing empty elements.
Install and offline help
Use your browser's install action, if available. Installation is optional; you can keep using this website normally.
Tools need an internet connection. Offline support provides a connection information page, not all-tools offline use.
Reset keeps favorites and preferences. It does not restore unsaved tool content.