Articles on: PDF Services

Generate QR Code via API

The Generate QR Code endpoint creates a QR code image from a string of data you provide. You can customise its appearance by changing the color or embedding a logo directly in the centre. The generated QR code is saved as an asset in your library, making it easy to reuse across multiple documents.


Key parameters include:


  • content – The text or URL you want to encode.
  • color – The colour of the QR code in hexadecimal format (e.g., #000000 for black).
  • logo_url or logo_base64 – A URL or base64 string for an image to be placed in the centre of the QR code.
  • output - The format for the response, which can be a URL or a base64 string.


Endpoint Details



Request Body


This request generates a QR code with a custom blue colour that links to our homepage.


{
"content": "https://pdfgeneratorapi.com",
"color": "#7CCBB2",
"logo_base64": "iVBORw0KGgoAAAANSUhEUgAAA1AAAAMzCAYAAA...",
"output": "base64"
}


Response


The API returns a base64 encoded QR code image, along with metadata about the asset.


{
"response": "JVBERi0xLjcKJeLjz9MKNyAwIG9iago8PCAvVHlwZSA...",
"meta": {
"encoding": "base64",
"content-type": "image/png"
}
}



Generated QR code




Updated on: 11/09/2025

Was this article helpful?

Share your feedback

Cancel

Thank you!