# .env to JSON

Parse a .env file into a JSON object, handling quotes, comments and "export" prefixes.

- Endpoint: `POST https://setget.net/v1/tools/env-to-json` with JSON `{"input": {...}}`
- MCP: `run_tool` with `slug` = `env-to-json`
- Page: https://setget.net/tools/env-to-json

## Inputs

- `text` (required, string): The contents of a .env file. Do not paste real secrets.
- `indent` (optional, integer, default `2`, range 0..8): Spaces per level. 0 gives one compact line.

## Example

```json
{"input":{"text":"# app\nPORT=8080\nexport NAME=\"My App\"\nDEBUG=true # on","indent":0}}
```

Result:

```json
{"text":"{\"PORT\":\"8080\",\"NAME\":\"My App\",\"DEBUG\":\"true\"}","variables":3,"skipped":[]}
```

**Is it safe to paste secrets?** No. Input is processed in memory and not stored, but you should never send live credentials to any online tool. Replace them with placeholders first.
