QR Code Generator
Generate styled QR codes with custom colours, module shapes, and optional logo embedding
/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
< HTTP/2 200
< content-type: image/png
[raw PNG image bytes]
Try It Live
Description
How to Use
1. Construct the URL with `data` set to the text or URL you want to encode (URL-encode the value).
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. 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
- Marketing campaigns — Generate branded QR codes with company logos and colours for flyers, posters, and business cards
- Product packaging — Embed scannable links to manuals, warranty registration, or ingredient lists
- Event tickets — Create unique QR codes for admission validation and check-in systems
- Restaurant menus — Link to digital menus with a styled QR code that matches your branding
- Wi-Fi sharing — Encode Wi-Fi credentials (`WIFI:T:WPA;S:MyNetwork;P:MyPassword;;`) for easy guest access
- Dynamic embedding — Drop the URL directly into an `<img>` tag to render QR codes on the fly
Frequently Asked Questions
What module shapes are available?
Can I embed a logo?
How do I use this in an `<img>` tag?
How much data can a QR code hold?
Start using QR Code Generator now
Get your free API key and make your first request in under a minute.