# GET /qr

Generate a QR code for any text or URL.

Free, zero-auth JSON API served by **FreeForAgents**. No API key, no signup. All responses include `ok`, the payload fields shown below, and a `docs` URL. CORS is fully open (`Access-Control-Allow-Origin: *`).

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `text` | string | yes | The text or URL to encode (max 2953 bytes). |
| `ec` | string | no | Error correction level: L (7%), M (15%, default), Q (25%), H (30%). |
| `scale` | integer | no | Pixel size of each module, 1-64 (default 8). |
| `margin` | integer | no | Quiet-zone border in modules, 0-16 (default 4). |
| `dark` | string | no | Foreground hex color, e.g. 000000. |
| `light` | string | no | Background hex color, e.g. ffffff. |
| `format` | string | no | 'json' (default) or 'svg' to get raw image/svg+xml. |

## Example request

```bash
curl -s "https://freeforagents.dev/qr?text=https%3A%2F%2Ffreeforagents.dev&ec=M"
```

## Example response

```json
{
  "ok": true,
  "docs": "https://freeforagents.dev/docs/qr.md",
  "text": "https://freeforagents.dev",
  "ec": "M",
  "version": 3,
  "modules": 29,
  "byte_length": 24,
  "svg": "<svg xmlns=\"http://www.w3.org/2000/svg\" …></svg>"
}
```

## See also

- [`/ip`](https://freeforagents.dev/docs/ip.md) — Look up your IP address and geolocation.
- [`/uuid`](https://freeforagents.dev/docs/uuid.md) — Generate RFC 4122 version 4 UUIDs.
- [`/ulid`](https://freeforagents.dev/docs/ulid.md) — Generate ULIDs (sortable unique identifiers).
- [`/hash`](https://freeforagents.dev/docs/hash.md) — Hash text with SHA-1/256/384/512.
- [`/base64`](https://freeforagents.dev/docs/base64.md) — Encode or decode Base64 strings.
- [`/convert`](https://freeforagents.dev/docs/convert.md) — Convert between units (length, mass, volume, area, data, speed, time, temperature).
- [`/time`](https://freeforagents.dev/docs/time.md) — Current time in any timezone.
- [`/timestamp`](https://freeforagents.dev/docs/timestamp.md) — Current Unix timestamp.
- [`/random`](https://freeforagents.dev/docs/random.md) — Cryptographically secure random integers.
- [`/dice`](https://freeforagents.dev/docs/dice.md) — Roll dice.
- [`/password`](https://freeforagents.dev/docs/password.md) — Generate strong random passwords.
- [`/lorem`](https://freeforagents.dev/docs/lorem.md) — Lorem ipsum placeholder text.
- [`/emoji`](https://freeforagents.dev/docs/emoji.md) — Random emoji.
- [`/joke`](https://freeforagents.dev/docs/joke.md) — Random clean programming joke.
- [`/fact`](https://freeforagents.dev/docs/fact.md) — Random fun fact.
- [`/quote`](https://freeforagents.dev/docs/quote.md) — Random inspirational quote.
- [`/holidays`](https://freeforagents.dev/docs/holidays.md) — Public holidays by country and year.
- [`/fx`](https://freeforagents.dev/docs/fx.md) — Foreign exchange rates (daily, no key).
- [`/headers`](https://freeforagents.dev/docs/headers.md) — Echo your request headers.
- [`/json`](https://freeforagents.dev/docs/json.md) — Fetch any URL and get parsed JSON back.
- [`/avatar`](https://freeforagents.dev/docs/avatar.md) — Deterministic generated avatar images.
- [`/dns`](https://freeforagents.dev/docs/dns.md) — DNS record lookup via Cloudflare DoH.
