📱

QR Code Generator

Generate styled QR codes with custom colours, module shapes, and optional logo embedding

GET 1 credit /v1/qr/generate
curl "https://barcode.toolkitapi.io/v1/qr/generate?data=https%3A%2F%2Ftoolkitapi.io&size=600&module_shape=rounded&fg_color=%231a1a2e&error_correction=H" \
  --output qr.png
import httpx

resp = httpx.get(
    "https://barcode.toolkitapi.io/v1/qr/generate?data=https%3A%2F%2Ftoolkitapi.io&size=600&module_shape=rounded&fg_color=%231a1a2e&error_correction=H",
)
print(resp.json())
const resp = await fetch("https://barcode.toolkitapi.io/v1/qr/generate?data=https%3A%2F%2Ftoolkitapi.io&size=600&module_shape=rounded&fg_color=%231a1a2e&error_correction=H", {
});
const data = await resp.json();
console.log(data);
# See curl example
Response 200 OK
< HTTP/2 200
< content-type: image/png
[raw PNG image bytes]

Try It Live

Live Demo

Description

Generate styled QR codes with custom colours, module shapes, and optional logo embedding

How to Use

1

1. Construct the URL with `data` set to the text or URL you want to encode (URL-encode the value).

2

2. Add optional query parameters to customise the output: `size`, `format`, `fg_color`, `bg_color`, `module_shape`, `error_correction`, `logo_url`, and `logo_size`.

3

3. The response is the raw image — save it to a file, embed it in an `` tag, or pipe it directly into your workflow.

About This Tool

Use the QR Code Generator to create fully styled QR codes with custom colours, module shapes, and optional logo embedding. Pass your data — a URL, plain text, or any payload up to ~4 KB — and the API returns the raw image directly with the appropriate `Content-Type` header.

Because the endpoint is a simple GET, you can embed QR codes directly in HTML pages, emails, or documents without any decoding step:

```html ```

You can customise foreground and background colours, choose from four module shapes (square, rounded, circle, gapped), set the error correction level, and embed a logo from a URL in the centre of the code.

Why Use This Tool

Frequently Asked Questions

What module shapes are available?
Four styles: `square` (classic), `rounded` (soft corners), `circle` (dots), and `gapped` (spaced squares). All are scannable by standard QR readers.
Can I embed a logo?
Yes — provide `logo_url` pointing to a publicly accessible PNG. Logo embedding is only supported with PNG output. Adjust `logo_size` (0.05–0.40) to control how much of the QR code the logo covers.
How do I use this in an `<img>` tag?
Drop the endpoint URL directly as the `src`: ```html <img src="https://barcode.toolkitapi.io/v1/qr/generate?data=https://example.com&module_shape=rounded" alt="QR code"> ``` Remember to URL-encode special characters in `data` (e.g. `https%3A%2F%2F`).
How much data can a QR code hold?
The API accepts up to 4,296 characters. In practice, shorter data produces simpler codes that scan more reliably — especially at smaller sizes or with a logo embedded.

Start using QR Code Generator now

Get your free API key and make your first request in under a minute.