QR generator

This API generates a QR code image based on provided data and size parameters.
2ms

About

The API receives parameters to generate a QR code, including the type of image format (e.g., PNG) and encoded data containing the QR code content and size. The QR generator is then returned as an image response.
by GLOBUS.studio

Endpoint

				
					/**
 * QR Code Generator API
 * GET https://api.globus.studio/v2/qr?data=...&type=png|jpg|gif&size=1-10
 * Response: image blob
 * Also usable as <img src="...">
 */

// JS (create img element)
function qrCode(data, type = 'png', size = 5) {
    const img = document.createElement('img');
    img.src = `https://api.globus.studio/v2/qr?data=${encodeURIComponent(data)}&amp;type=${type}&amp;size=${size}`;
    img.alt = 'QR Code';
    document.body.appendChild(img);
}

qrCode('Hello, World!');

// HTML
// <img src="https://api.globus.studio/v2/qr?data=Hello%2C%20World%21&amp;type=png&amp;size=5">