QR Code Generator

Generate a QR code and download PNG/SVG.

Configure inputs in pipeline.

Output will appear here.

For informational purposes only.

No data is stored or transmitted.

(function(){ const input = document.querySelector('#qr-data'); const sizeEl = document.querySelector('#qr-size'); const color = document.querySelector('#qr-color'); const img = document.querySelector('#qr-img'); const dl = document.querySelector('#qr-download'); const run = ()=>{ const text = (input?.value || '').trim(); if(!text){ if(img) img.style.display='none'; if(dl) dl.style.display='none'; return; } const size = sizeEl?.value || '200'; const colorHex = (color?.value || '#000000').replace('#',''); const url = `https://api.qrserver.com/v1/create-qr-code/?size=${size}x${size}&color=${colorHex}&data=${encodeURIComponent(text)}`; if(img){ img.src = url; img.style.display='block'; } if(dl){ dl.href = url; dl.textContent = `Download ${size}x${size} PNG`; dl.style.display='inline-block'; } }; document.getElementById('run-btn')?.addEventListener('click', run); [input, sizeEl, color].forEach(el=> el?.addEventListener('input', run)); })();