Generate QR Code
Build the text for common QR payloads - web link, Wi-Fi login, contact card, e-mail, phone - then choose size, colours and error correction. Scan the preview with your phone to test it.
How it works
- A QR code just stores text. Phones recognise special formats:
WIFI:T:WPA;S:name;P:pass;;,BEGIN:VCARD ...,mailto:,tel:,https://. - Error correction adds redundancy: level H still scans with 30% of the code damaged or covered by a logo, but the code gets denser.
- Certificates (361) use a QR with the verification URL; invoices and receipts encode number + amount.
Map<EncodeHintType, Object> hints = Map.of(
EncodeHintType.CHARACTER_SET, "UTF-8",
EncodeHintType.ERROR_CORRECTION, ErrorCorrectionLevel.H,
EncodeHintType.MARGIN, 2);
BitMatrix m = new MultiFormatWriter().encode(text, BarcodeFormat.QR_CODE, 320, 320, hints);