---
title: "Generate a QR code (PNG, SVG, or data URI)"
method: GET
path: "/qr/generate"
tags: ["QR"]
---

# Generate a QR code (PNG, SVG, or data URI)

`GET /qr/generate`

## Request

- Base URL: `https://abundanceapis.com`
- URL: `https://abundanceapis.com/qr/generate`
- Auth: none declared

Encodes text or a URL into a QR code. format=png returns an image/png, format=svg returns image/svg+xml, format=datauri returns JSON with a base64 data URI you can drop into an <img> src.

## Query parameters

- `data` string, required
- `format` 'png' | 'svg' | 'datauri'
- `size` integer
- `margin` integer
- `ecc` 'L' | 'M' | 'Q' | 'H'
- `dark` string
- `light` string

## Other responses

- `400`: Bad request

---

[API](https://skmtc.dev/abundanceapis/apis/web-toolbox.md) · [All operations](https://skmtc.dev/abundanceapis/apis/web-toolbox/llms.txt) · [OpenAPI document](https://skmtc.dev/abundanceapis/apis/web-toolbox/revisions/ada2893fef43?raw)
