What's inside a QR code
Three large square "finder patterns" in the corners orient the scanner. Smaller "alignment patterns" handle perspective distortion. The rest is data + Reed-Solomon error-correction bits applied to a masked bitstream. The encoder picks one of eight mask patterns to minimise visual clumping that would hurt readability.