Make a QR code
A QR code is a small, precise thing: wrong error-correction level, wrong quiet zone or a cramped size and it simply won't scan. This API generates QR codes for URLs, WiFi credentials, contact cards (vCard) or plain text, delivered as PNG or SVG, so you can produce hundreds of correct, scannable codes without touching a design tool.
Run — free
Runs in your browser. Free, unlimited — your data never leaves this page.
Four payload types, one endpoint
Not every QR code encodes a URL. A WiFi QR code carries the network name, password and encryption type so a phone camera can join a network without anyone typing a password. A vCard QR code embeds a full contact card that drops straight into an address book. A plain text QR code just carries a string, useful for anything from a serial number to a short message. dev.qr_generate handles all four payload types through the same request shape, so your integration code doesn't fork per use case.
How a request becomes an image
You submit the payload type and its data, plus the output format you want. The task is accepted asynchronously with a task_id, and once rendered, the image arrives by signed webhook or a signed link valid for 24 hours. PNG suits anything destined for print or a fixed-size display; SVG is the better choice when the code needs to scale — think packaging that gets resized across product variants, or a code embedded in a responsive web page.
What actually makes a QR code reliable
Scannability isn't just about the black-and-white pattern being technically correct — it depends on adequate quiet zone (the blank margin around the code), sufficient contrast, and an error-correction level appropriate for how the code will be printed or displayed. A code destined for a torn cardboard box needs a higher error-correction level than one shown cleanly on a screen. The generator applies sensible defaults for each payload type so you don't have to make that judgment call manually for every code.
A brief note on the format itself
QR codes were developed in the 1990s for tracking parts on automotive assembly lines, valued for encoding far more data than a standard barcode in the same physical space and for being readable from any angle. That industrial origin is part of why the format is so forgiving in automated generation — it was built to be printed and scanned imperfectly, on a factory floor, not just in a design studio.
Generating at scale without a design tool
Because each call is independent and async, this fits naturally into content pipelines: generating a unique WiFi QR per hotel room, a vCard QR per employee badge, or a URL QR per product SKU during a catalog import — thousands of codes produced from a script, each one arriving as its own webhook rather than requiring a batch job you have to babysit.
What you can do with it
Guest WiFi access
Generate a unique WiFi QR code per hotel room or event badge so guests join the network with a scan instead of typing a password.
Digital business cards
Produce a vCard QR code for each employee that saves their contact info directly into a phone's address book at a conference booth.
Product packaging
Generate an SVG QR code linking to a product page, sized to scale cleanly across small and large packaging variants.
Event check-in
Create a plain-text QR code encoding a unique registration ID for each attendee, scanned at the door for check-in.
FAQ
What QR code types does the API support?
URL, WiFi network credentials, vCard contact cards, and plain text — the four payload types cover the large majority of real-world QR use cases.
PNG or SVG — which should I choose?
PNG is a good default for print at a fixed size or for direct display; SVG is better when the code will be resized or embedded in a responsive layout, since it stays sharp at any scale.
Is QR code generation free?
The tool above runs free in your browser. The API is paid — each call draws from your prepaid ForHosting KIT balance: top up from $10.00 (it never expires), pay each request's published price, and a call with no balance returns HTTP 402. No subscription, no tokens, and a failed task is never charged.
How much does it cost?
0.002 dollars per request plus 0.004 dollars per generated image.
Can I generate QR codes in bulk?
Yes — each generation call is async and independent, so you can script thousands of requests and process the resulting webhooks as they complete.
Will the QR code still scan if I add a logo?
This endpoint generates standard QR codes without a logo; for a branded code with a logo embedded and verified scannable, use the dedicated QR-with-logo endpoint instead.
How long until I get my QR code image?
The request is accepted immediately with a task_id, and the finished image is delivered via signed webhook or a 24-hour signed link once rendering completes.
Are failed generations charged?
No — every task gets up to three retries and you're only billed on a successful result.
For developers — API access
Everything on this page is available programmatically. This section is for teams who want to wire it into their own systems; everyone else can just use the tool above.
API endpoint
Prefer to automate it? One authenticated POST creates the task; the result comes back by webhook or a signed link. The same capability also runs here on the web, and soon from our app, email and Telegram.
Call it from your stack
curl -X POST https://api.kit.forhosting.com/dev/qr-generate \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"text":"https://forhosting.com/kit"}'const res = await fetch("https://api.kit.forhosting.com/dev/qr-generate", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"text": "https://forhosting.com/kit"
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/dev/qr-generate",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"text": "https://forhosting.com/kit"
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/dev/qr-generate", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"text":"https://forhosting.com/kit"}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"text":"https://forhosting.com/kit"}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/dev/qr-generate", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"text": "https://forhosting.com/kit"
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "dev.qr_generate",
"status": "queued",
"_links": {
"result": "/tasks/tsk_…/result"
}
}The API is asynchronous: the call returns a task_id immediately and the result arrives by webhook. Polling is capped at 1 req/s per task.
Pricing
Published price — no tokens, no invented credits. A failed task is never charged.
Errors
| HTTP | Code | Meaning |
|---|---|---|
401 | unauthorized | Missing or invalid API key. |
402 | insufficient_balance | Your balance doesn't cover the task price. |
404 | unknown_type | That task type doesn't exist. |
429 | rate_limited | Too many requests. Use the webhook instead of polling. |