An aesthetic 2D-barcode, e.g. QR code, carries a given message in the payload and yet its visual appearance resembles another given logo image. The requirement of embedding a message in a “cover” image is similar to digital watermarking but with a crucial difference that, for the aesthetic 2D-barcode, the decoder is predetermined and fixed. Hence the designs and performances of the aesthetic 2D-barcode heavily rely on the predetermined decoder. In this paper, we focus on the underlying systematic encoding function in QR code. We first formulate a framework that optimizes the visual appearance of the codeword and yet meets the coding requirement. Since finding such an optimal codeword is computationally expensive, we next propose a heuristic to search for a feasible solution, and incorporate image processing operations to enhance the visual appearance. Although our method is designed for QR code, our approach can be applied to other 2D-barcodes that employ similar coding mechanisms of error correction code.