QR Code Generator API

Category: utility

Generate QR codes from text, URLs, or data with customizable size and colors. Runs entirely in the browser using qrcode.js.

Endpoint

N/A Browser API (qrcode.js)
No Server API

Response

Content-Type: N/A

This tool generates QR codes in the browser using qrcode.js. No server-side API is available.

// Browser-only: uses qrcode.js

cURL Example

# No cURL equivalent — this tool runs in the browser

Code Samples

// QR code generation using qrcode.js
import QRCode from 'qrcode';

QRCode.toCanvas(document.getElementById('canvas'),
    'https://anythingtext.com',
    { width: 256 },
    (error) => { if (error) console.error(error); });
# For server-side QR code generation:
import qrcode

qr = qrcode.make('https://anythingtext.com')
qr.save('qrcode.png')
// For server-side QR code generation, use ZXing:
import com.google.zxing.*;
import com.google.zxing.client.j2se.MatrixToImageWriter;

BitMatrix matrix = new MultiFormatWriter().encode(
    "https://anythingtext.com", BarcodeFormat.QR_CODE, 256, 256);
MatrixToImageWriter.writeToPath(matrix, "PNG", Path.of("qr.png"));