API Reference · V4

QR Code Generator API

Quickly create a custom QR code using PHP, JavaScript, HTML — or just by visiting a URL in your browser. 100 requests every 24 hours, free, with no payment details required.

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.

100 requests per 24 hours for FREE — no payment details required. Need more? See pricing.

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!

Check your spam folder for this email! It sometimes lands there.

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:

example-1.phpphp
<?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 . "' />";
index.htmlhtml
<img src="https://www.qrcoder.co.uk/api/v4/?key=YOUR-API-KEY&text=Hello+World"
     alt="QR code" width="240" height="240" />
terminalbash
curl "https://www.qrcoder.co.uk/api/v4/?key=YOUR-API-KEY&text=Hello+World" \
  --output qr.png
qr.jsjavascript
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:

GET https://www.qrcoder.co.uk/api/v4/
minimal requesturl
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.

ParameterTypeDescription
keyrequiredstringThe API key we send in your register email. Needs to be included with every request.
textrequiredstringThe text you wish to encode in the QR code. Ensure it's URL-encoded if it needs to be.
typeoptionalsvg | pngOutput format. svg is the default (scalable vector XML). png returns a raster image.
backgroundoptionalhex (no #)Background colour in 6-digit hexadecimal. Example: E6E6E6.
foregroundoptionalhex (no #)Foreground colour in 6-digit hexadecimal. Example: 1B1B1F.
eooptionalhex (no #)The eye outer colour in 6-digit hexadecimal. Example: E84E1B.
eioptionalhex (no #)The eye inner colour in 6-digit hexadecimal. Example: 1B1B1F.
sizeoptionalintegerThe module size in pixels. Example: 4.
paddingoptionalintegerA multiplier of the size parameter to adjust the quiet-zone padding. Example: 4.
fileoptionaltrueIf 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:

minimalurl
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:

full exampleurl
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:

templateurl
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]
Get your free API key View pricing