User Rating 0.0
Total Usage 0 times
Category Generators
0 characters · 0 decoded bytes
6px
Your QR code will appear here
Is this tool helpful?

Your feedback helps us improve.

About

Base64 encoding inflates binary data by roughly 33%, producing strings of ASCII characters from the set A - Z, a - z, 0 - 9, +, /, and padding =. Embedding such strings directly into QR codes requires byte-mode encoding, which consumes 8 bits per character. A Version 40 QR symbol at error correction level L holds a maximum of 2953 bytes. Exceeding this silently truncates data or produces unreadable symbols in naive tools. This generator validates the Base64 input, computes Reed-Solomon parity using Galois Field GF(28) arithmetic, evaluates all 8 mask patterns against the ISO/IEC 18004 penalty rules, and renders the optimal matrix to a downloadable PNG.

The decoded byte length is shown so you can verify payload integrity before scanning. Note: QR scanners on older devices may struggle with versions above 25. For large payloads, increase the error correction level to M or Q at the cost of reduced capacity. This tool approximates display only; actual scanner compatibility depends on camera optics and decoder firmware.

base64 qr code qr generator base64 decoder qr code generator encode barcode

Formulas

QR codes use Reed-Solomon error correction over GF(28) with the irreducible polynomial p(x) = x8 + x4 + x3 + x2 + 1 (value 0x11D). The generator polynomial for t error correction codewords is:

g(x) = t1i=0 (x αi)

where α = 2 is the primitive element. Each data codeword is 8 bits. For byte-mode encoding, the character count indicator length depends on the QR version:

{
8 bits if V 916 bits if 10 V 40

The mask penalty score S is evaluated as S = N1 + N2 + N3 + N4, where N1 penalizes runs of 5+ same-color modules, N2 penalizes 2×2 blocks, N3 penalizes finder-like patterns, and N4 penalizes color imbalance. The mask with the lowest S is selected.

Where V = QR version (1 - 40), t = number of EC codewords per block, α = primitive element in GF(28), N1..4 = penalty rule scores per ISO/IEC 18004.

Reference Data

QR VersionModulesEC Level L bytesEC Level M bytesEC Level Q bytesEC Level H bytes
121×211714117
225×2532262014
329×2953423224
433×3378624634
537×37106846044
641×411341067458
745×451541228664
1057×57271213151119
1577×77520412292220
2097×97858666482364
25117×1171276998718538
30137×13717321370982742
35157×157230618121306986
40177×1772953233116631273

Frequently Asked Questions

A Version 40 QR code at error correction level L holds a maximum of 2953 bytes. Base64 encoding inflates data by ~33%, so a 2953-byte Base64 string represents roughly 2215 raw bytes. If your input exceeds the capacity for the selected EC level, the tool will report the exact overflow in bytes and refuse to generate a corrupt symbol. Reduce the string length or switch to EC level L for maximum capacity.
Level L recovers ~7% damaged codewords, M recovers ~15%, Q recovers ~25%, and H recovers ~30%. Higher correction means more redundancy codewords, which reduces data capacity. For Base64 strings displayed on clean screens, level L is sufficient. If the QR will be printed on materials subject to wear (stickers, packaging), use Q or H. Each step up roughly halves the remaining data headroom at high versions.
Yes. The input is checked against the RFC 4648 Base64 alphabet (A-Z, a-z, 0-9, +, /) with optional = padding. The tool also attempts atob() decoding. If the string contains illegal characters or has incorrect padding length (not a multiple of 4 after trimming whitespace), a specific error is shown. Whitespace and newlines are stripped before validation, matching standard PEM/MIME behavior.
ISO/IEC 18004 specifies 8 mask patterns. Different generators may select different masks or use different optimization strategies. This tool evaluates all 8 masks and selects the one with the lowest penalty score as required by the standard. The encoded data is identical; only the visual XOR pattern differs. Any compliant scanner will decode all valid masks identically.
This tool encodes the literal Base64 ASCII string into the QR code using byte mode. The scanner will return the Base64 text, which the receiving application must then decode. If you need to encode raw binary, you would first Base64-encode it (which is what this tool expects as input), producing a scannable text representation that any system can decode back to binary.
Each module (the smallest square unit) should be at least 0.33mm in print for reliable scanning at normal distances. On screen, 4-8 pixels per module works well. For high-version QR codes (Version 20+), use a larger module size to ensure the overall image is large enough. The quiet zone (4-module white border) is automatically included in the generated image.