Env Yaml Converter API
https://api.findutils.com/api/tools/env-yaml-converter/execute Convert a dotenv .env file to a flat YAML map, or YAML back to KEY=value lines. The shape option wraps the map as a pasteable Docker Compose (services.app.environment) or GitHub Actions (jobs.app.env) snippet rather than a whole file. Comments, blank lines and an "export " prefix are handled, and a duplicate key keeps the last value and is reported. Values stay strings unless infer_types is on, matching what process.env returns. The reverse direction accepts a flat mapping or one of those snippet shapes and rejects nested values instead of inventing nested names. Not a Kubernetes Secret generator and not a shell parser.
Request body
application/json-
input
string required
The .env text or the YAML document to convert.
-
mode
string optional
Conversion direction. Default: env-to-yaml. One of
env-to-yaml · yaml-to-env. Default"env-to-yaml". -
shape
string optional
env-to-yaml: "plain" is a flat map (default); "compose" wraps it under services.app.environment; "actions" wraps it under jobs.app.env. One of
plain · compose · actions. Default"plain". -
indent
integer optional
env-to-yaml: YAML indentation width (1-8). Default: 2. Default
2. -
infer_types
boolean optional
env-to-yaml: turn unquoted numbers, true, false and null into YAML types. Default: false (every value stays a string, as process.env returns it). Default
false. -
skip_empty
boolean optional
Leave out keys whose value is empty. Default: false. Default
false. -
export_prefix
boolean optional
yaml-to-env: prefix every line with "export ". Default: false. Default
false.
Example arguments
Verified{
"input": "API_URL=https://example.com\nDEBUG=true"
} More Data tools
- Api Docs Generator Return API documentation generated from a list of endpoints, as Markdown (with table of contents, request/response examples) or as an OpenAP
- Bookmarks Html To Csv Convert a browser bookmarks.html export from Chrome, Firefox, Edge, Safari or any other browser that writes the Netscape bookmark format int
- Csv To Bookmarks Html Convert a CSV of links into a Netscape bookmarks.html file that Chrome, Firefox, Edge and Safari import.
- Csv To Json Parse CSV text into an array of objects keyed by the header row.
- Csv To Ndjson Convert CSV into newline-delimited JSON (NDJSON, JSON Lines, .jsonl): one JSON object per line, keyed by the header row.
- Csv To Sql Convert CSV text into SQL INSERT statements, optionally preceded by a CREATE TABLE.