Multi-line values
Backslash-continued values aren't supported.
Fix: Inline multi-line values onto a single line.
header • up to 320x100 / 728x90
Convert a .env (dotenv) file into structured JSON with quote, comment, and escape handling
Output will appear here...
content bottom • up to 300x250
sidebar • 160x600
Last reviewed:
JSON (JavaScript Object Notation) is a lightweight, human-readable data format used almost everywhere on the web for APIs, config files, and log output.
`.env` to JSON Converter parses a dotenv file and produces a JSON object of string values. It handles `#` comments, optional `export` prefixes, single and double quoted values, and common escape sequences (`\n`, `\r`, `\t`, `\"`).
Perfect for debugging, migrating config into JSON-based schemas, or feeding environment variables into tools that accept JSON.
# Database export DATABASE_URL="postgres://localhost:5432/app" PORT=3000 FEATURE_FLAG=on # toggle
{
"DATABASE_URL": "postgres://localhost:5432/app",
"PORT": "3000",
"FEATURE_FLAG": "on"
}Backslash-continued values aren't supported.
Fix: Inline multi-line values onto a single line.
${VAR} interpolation isn't expanded.
Fix: Resolve interpolation before converting.
Yes — both full-line and trailing ` # …` comments are stripped.
Yes — the `export` prefix is ignored.
All JSON values are strings — integers and booleans are preserved as strings for fidelity.
No — pre-resolve interpolation before converting.
No — the conversion is client-side.
Pair with JSON tools and environment helpers. You can also browse the full Data Converters category for more options.
Flatten nested JSON into single-level key/value pairs using dotted or custom separator paths
Rebuild nested JSON from a flat map of dotted keys and array-index paths
Format, validate, and beautify JSON online with readable indentation, syntax checking, and copy-ready output for APIs, logs, and config files.
Convert JSON into TypeScript interfaces and types online with nested objects, arrays, optional fields, and copy-ready model definitions.
Validate JSON syntax and catch parse errors instantly. Paste JSON and get immediate feedback on structural issues, missing commas, and unquoted keys.
Convert YAML to JSON format
Convert Excel or CSV spreadsheets to JSON online with sheet previews, structured export, and copy-ready data for apps, APIs, and scripts.
Convert JSON arrays into JSONL or NDJSON online with one object per line, copy-ready output, and safe handling of nested records for data pipelines.
Convert JSON to clean TOML online for config files, package settings, and developer tooling that prefers readable key-value documents.
Convert JSONL or NDJSON into formatted JSON arrays online, validate each line, and turn newline-delimited records into readable structured output.
Convert TOML to formatted JSON online for config inspection, debugging, API payload prep, and cross-format developer workflows.
Convert CSV to JSON format