Decode QR Code

Secure
📸

Paste screenshot here

Ctrl+V or Cmd+V

📁

Drop image here

or click to select

QR Code

🔒 Processing in browser | No data sent during preview

📡 API Documentation

Decode QR codes programmatically via REST API

POST /api/qr/decode

Send Base64 encoded image in JSON body

curl -X POST http://localhost:3000/api/qr/decode \ -H "Content-Type: application/json" \ -d '{"image":"data:image/png;base64,..."}'

GET /api/qr/decode

Send Base64 encoded image in query parameter

curl "http://localhost:3000/api/qr/decode?image=BASE64_STRING"

Response Format

{ "success": true, "data": { "secret": "JBSWY3DPEHPK3PXP", "issuer": "Google", "label": "user@example.com", "rawData": "otpauth://totp/..." } }

JavaScript Example

const file = document.querySelector('input[type="file"]').files[0]; const reader = new FileReader(); reader.onload = async (e) => { const response = await fetch('/api/qr/decode', { method: 'POST', headers: {'Content-Type': 'application/json'}, body: JSON.stringify({image: e.target.result}) }); const result = await response.json(); console.log(result.data.secret); }; reader.readAsDataURL(file);

Python Example

import requests, base64 with open('qr.png', 'rb') as f: img = base64.b64encode(f.read()).decode() response = requests.post( 'http://localhost:3000/api/qr/decode', json={'image': f'data:image/png;base64,{img}'} ) print(response.json()['data']['secret'])

💡 Tip: Image can be sent with or without data:image/... prefix. API accepts PNG, JPEG, GIF, WebP formats.