Introduction
Welcome to the latest version of the QR Code Generator API. Turn any text or URL into a crisp, fully-customisable QR code from a single GET request.
There's no SDK to install and no authentication flow beyond passing your API key in the request. If you can make an HTTP GET request, you can use QRCODER.
Step 1 — Get an API key
Use the form below to create a quick account. We'll email you the API key you need to access the API, so make sure your address is correct!
Step 2 — Make a request
Using the key from your email, build a GET request. Send your API key with every request to get the QR code returned. Here it is in four flavours:
<?php
$key = "YOUR-API-KEY"; // your unique api key
$text = "Hello World!"; // what to turn into a QR code
// make sure you urlencode the text part to be safe!
$url = "https://www.qrcoder.co.uk/api/v4/?key=" . $key
. "&text=" . urlencode($text);
echo "<img src='" . $url . "' />";
<img src="https://www.qrcoder.co.uk/api/v4/?key=YOUR-API-KEY&text=Hello+World"
alt="QR code" width="240" height="240" />
curl "https://www.qrcoder.co.uk/api/v4/?key=YOUR-API-KEY&text=Hello+World" \
--output qr.png
const key = "YOUR-API-KEY";
const text = encodeURIComponent("Hello World!");
const url = `https://www.qrcoder.co.uk/api/v4/?key=${key}&text=${text}`;
document.getElementById("qr").src = url;
Endpoint
All requests go to a single base URL. A minimal request needs just two parameters — your key and the URL-encoded text:
https://www.qrcoder.co.uk/api/v4/?key=YOUR-API-KEY&text=Hello+World
Parameters
A small but powerful set of parameters. Only key and text are required; everything else has a sensible default.
| Parameter | Type | Description |
|---|---|---|
| keyrequired | string | The API key we send in your register email. Needs to be included with every request. |
| textrequired | string | The text you wish to encode in the QR code. Ensure it's URL-encoded if it needs to be. |
| typeoptional | svg | png | Output format. svg is the default (scalable vector XML). png returns a raster image. |
| backgroundoptional | hex (no #) | Background colour in 6-digit hexadecimal. Example: E6E6E6. |
| foregroundoptional | hex (no #) | Foreground colour in 6-digit hexadecimal. Example: 1B1B1F. |
| eooptional | hex (no #) | The eye outer colour in 6-digit hexadecimal. Example: E84E1B. |
| eioptional | hex (no #) | The eye inner colour in 6-digit hexadecimal. Example: 1B1B1F. |
| sizeoptional | integer | The module size in pixels. Example: 4. |
| paddingoptional | integer | A multiplier of the size parameter to adjust the quiet-zone padding. Example: 4. |
| fileoptional | true | If set, you'll get a download instead of an inline image. Example: true. |
Examples
Minimal example
Send a GET request to the endpoint with URL-encoded text:
https://www.qrcoder.co.uk/api/v4/?key=YOUR-API-KEY&text=Hello+World
Full example
A branded PNG with custom colours, independent eye colours, and tuned size & padding:
https://www.qrcoder.co.uk/api/v4/?key=YOUR-API-KEY&text=Hello+World&type=png&background=FFFFFF&foreground=880000&eo=F10000&ei=AA0000&size=4&padding=4
Template
All parameters in one place for reference:
https://www.qrcoder.co.uk/api/v4/?key=[KEY]&type=[svg|png]&text=[encoded-text]&background=[hex]&foreground=[hex]&eo=[hex]&ei=[hex]&size=[px]&padding=[px]