Free QR Code Generator

Create a custom QR code for any occasion in seconds.

Create a QR »

QR Code Generator API Documentation

Easily generate QR codes dynamically using our API. Below you'll find all the necessary information to integrate the API into your application, including request details, parameters, and response formats.


Base URL

https://qrcodegenerator.pw/api/v1/generate_qr.php

Request Methods

The API supports both GET and POST requests for maximum flexibility.

Authentication

All requests require a valid API token. Include your token in the request as shown below:

?token=your_api_token

Parameters

Parameter Type Description
data string The content to encode in the QR code (e.g., a URL, plain text).
size integer (optional) Dimensions of the QR code in pixels. Default: 300.
color string (optional) Hex code for the QR code's foreground color. Default: #000000 (black).
background_color string (optional) Hex code for the QR code's background color. Default: #FFFFFF (white).

Sample Request

Below is an example of a GET request to generate a QR code:

https://qrcodegenerator.pw/api/v1/generate_qr.php?token=your_api_token&data=https://yourwebsite.com&size=300&color=FF5733&background_color=FFFFFF

Response

If the request is successful, the API will return the QR code as a PNG image. For invalid requests, a JSON error response will be returned:

{
    "error": "Rate limit exceeded. Try again later."
}

Rate Limits

Each API token has usage limits. If the rate limit is exceeded, you'll receive the error message: {"error": "Rate limit exceeded. Try again later."}.

Example Code (cURL)

Generate a QR code using the following cURL command:

curl -X GET "https://qrcodegenerator.pw/api/v1/generate_qr.php?token=your_api_token&data=https://yourwebsite.com&size=300&color=000000&background_color=FFFFFF"

Code Samples

Here's a simple example in Python for using the API:

import requests

url = "https://qrcodegenerator.pw/api/v1/generate_qr.php"
params = {
    "token": "your_api_token",
    "data": "https://yourwebsite.com",
    "size": 300,
    "color": "FF5733",
    "background_color": "FFFFFF"
}
response = requests.get(url, params=params)

if response.status_code == 200:
    with open("qr_code.png", "wb") as f:
        f.write(response.content)
else:
    print(response.json())

Contact

If you encounter any issues or need assistance, reach out to us at support@qrcodegenerator.pw.


About

QR Code Generator is your ultimate tool for creating high-quality QR codes for free. Use our API to integrate QR generation into your applications effortlessly.

Follow Us

© 2025 QR Code Generator. All rights reserved.