text
query
size
query
ec
query
margin
query
# Basic QR code
curl "https://tcpdata.com/qr?text=Hello+World" > qr.svg
# URL with custom size
curl "https://tcpdata.com/qr?text=https://tcpdata.com&size=500" > qr.svg
# High error correction
curl "https://tcpdata.com/qr?text=Important+Data&ec=H" > qr.svg
# WiFi QR code
curl "https://tcpdata.com/qr?text=WIFI:S:MyNetwork;T:WPA;P:password123;;" > wifi-qr.svg
# WireGuard config QR
curl "https://tcpdata.com/qr?text=%5BInterface%5D%0APrivateKey%3Dkey123%0AAddress%3D10.0.0.2%2F24%0A%5BPeer%5D%0APublicKey%3Dpeer123%0AEndpoint%3Dvpn.example.com%3A51820&ec=L" > wireguard.svg
# vCard contact QR
curl "https://tcpdata.com/qr?text=BEGIN:VCARD%0AVERSION:3.0%0AFN:John+Doe%0ATEL:+1234567890%0AEND:VCARD" > contact-qr.svg
// Generate QR code
const params = new URLSearchParams({
text: 'https://tcpdata.com',
size: 400,
ec: 'M'
});
const response = await fetch(`https://tcpdata.com/qr?${params}`);
const svg = await response.text();
// Display in img tag
const img = document.createElement('img');
img.src = 'data:image/svg+xml;base64,' + btoa(svg);
document.body.appendChild(img);
// WiFi QR code
const wifiQR = await fetch(`https://tcpdata.com/qr?text=${
encodeURIComponent('WIFI:S:MyNetwork;T:WPA;P:password123;;')
}&size=300`);
import requests
# Generate QR code (returns SVG)
response = requests.get('https://tcpdata.com/qr', params={
'text': 'https://tcpdata.com',
'size': 500,
'ec': 'H'
})
# Save to file
with open('qrcode.svg', 'wb') as f:
f.write(response.content)
# WiFi QR code
wifi_params = {
'text': 'WIFI:S:MyNetwork;T:WPA;P:password123;;',
'size': 400
}
wifi_qr = requests.get('https://tcpdata.com/qr', params=wifi_params)
with open('wifi-qr.svg', 'wb') as f:
f.write(wifi_qr.content)
# Get SVG as text
svg_response = requests.get('https://tcpdata.com/qr', params={
'text': 'Hello World',
'ec': 'Q'
})
print(svg_response.text) # SVG XML