About this tool
A QR code is a square barcode that any phone camera reads instantly, and in Cambodia QR codes are already everywhere through Bakong KHQR payments. This generator creates standard, non-payment QR codes — for a website link, plain text, a wifi network, a contact card, a phone number, an SMS or an email — entirely inside your browser. Pick a payload type, fill in the fields, adjust the colours and error-correction level, and download the result as PNG or SVG for printing. The tool is for everyday sharing, not for payments: it cannot produce a KHQR code that a Bakong app will pay into — for that use the KHQR Generator. It also does not make dynamic codes whose target can be changed after printing, and it does not track scans. The links, wifi passwords and contact details you enter are used only to build the code image on your own device — the content is never uploaded to a server.
How it works
Everything runs in qr-code-generator-client.tsx using the qrcode npm package — there is no server round-trip. Choosing a payload type swaps the form; pressing Generate validates the fields, builds the standard payload string, and renders the matrix twice: QRCode.toDataURL for the PNG and QRCode.toString for the SVG. Payload shapes follow the conventions phone scanners read. A wifi code carries the ZXing grammar WIFI:T:…;S:…;P:…;; — built by buildWifiPayload in lib/qr/payloads.ts — with WPA/WPA2/WPA3, WEP or open-network modes and a hidden-SSID flag. Contacts become a minimal vCard 3.0, numbers become tel: links, messages use SMSTO:, and email produces a mailto: URL with subject and body. Error correction L, M, Q and H let a damaged or partly covered code still decode, restoring roughly 7, 15, 25 and 30 percent of it. Before generating, the page computes the contrast ratio between your foreground and background colours and refuses to render when it is too low — a code that will not scan is not worth printing.
Use cases
- A cafe or guesthouse in Phnom Penh printing a wifi QR so guests connect without asking staff for the password.
- A market stall or restaurant turning its Facebook page or Telegram channel into a poster QR that customers scan to follow.
- A freelancer or tuk-tuk driver sharing a vCard QR so clients save the name, number and website in one scan.
- A phone shop printing a phone or SMS QR so a customer can call or message support without typing the number.
- A teacher or NGO printing a link QR on handouts so students reach a resource page straight from their phones.
- An event organiser printing an email QR that opens a pre-addressed message for RSVPs or feedback.
Frequently asked questions
Is a QR code made here a KHQR payment code?
No. KHQR is a specific payment format published by the National Bank of Cambodia for the Bakong network: it uses the EMVCo merchant-presented QR structure and carries a bank account ID that payment apps know how to pay into. A generic QR from this tool is just data — a link, text or contact — and no payment app will treat it as a payment request. To create a payment code for your Bakong account, use the KHQR Generator on this site.
Can I edit or re-target a code after printing it?
No. This tool makes static QR codes: the content is encoded directly into the pattern and cannot be changed afterwards. If the link or wifi password changes, you must generate and print a new code. Dynamic QR services get around this by encoding a short redirect link they control — which is also how they can track scans — so for printed material with a stable destination, a static code is the simpler and more private choice.
Which error-correction level should I pick for a printed sign?
Choose Q or H for anything printed that will live outdoors, on a counter, or on a surface that gets dirty, scratched or covered. Higher error correction stores more redundant data — H restores about 30 percent of the code — so the scan survives more damage, at the cost of a denser matrix that must be printed slightly larger. For a code that stays on screen, M is usually enough.
Why do QR codes with a logo pasted in the middle sometimes fail to scan?
A logo physically covers modules of the code. Error correction can rebuild a limited share — up to the level you chose — but if the image hides more than that, or it sits on the large finder squares in the corners, the code cannot be decoded. This tool does not overlay logos itself; if you add one in an image editor, keep it small, use level H, and test-scan the final print on more than one phone before ordering copies.
How small can I print the code?
For comfortable arm’s-length scanning, keep the code at least 2–3 centimetres across and leave a quiet zone — an empty margin of roughly four modules — around all four sides so the scanner can tell where the code ends. Dark modules on a light background with strong contrast scan the most reliably, which is why the tool checks contrast and warns you before generating.
Is the wifi password or contact data I enter sent anywhere?
No. The payload is assembled and rendered entirely in your browser; nothing you type is uploaded. You can verify this yourself: open your browser’s developer tools, watch the network tab while you generate, and you will see no request carrying your data. The page does record anonymous usage events — which payload type was selected or that a download happened — but never the content itself.
Data and accuracy
The QR symbology (ISO/IEC 18004) is implemented by the qrcode npm package; the error-correction figures are the standard L/M/Q/H recovery percentages. Payload grammars follow the ZXing Barcode Contents conventions for wifi, vCard, phone, SMS and mailto URIs. All generation is local — no external data is fetched, so there is nothing to refresh or go stale.
Sources
- ZXing — Barcode Contents (payload format conventions) — ZXing project
- node-qrcode — QR code generation library documentation — node-qrcode maintainers
- QRcode.com — Error correction feature — DENSO WAVE
- EMVCo — QR Code specifications for payment systems — EMVCo
- KHQR Content Guideline v1.3 (Bakong, NBC) — National Bank of Cambodia
Content last reviewed 19 October 2026