Abstract:This paper proposed a modified scheme of embedding watermark in JPEG bitstream based on sorting, the motivation for this method is that it ensure the cover image is lossless after embedding the watermark and improve the embedding capacity. According to the statistical results of VLC usage in an image, we embed watermark by mapping an unused VLC to a used VLC. Sort the VLC(s) according to their appear rate in the bitstream before mapping, it will improve the VLC utilization rate and increase the embedding capacity after sorting. During the data embedding, we replace the codes appearing in the bitstream by the mapped codes according to the watermark. The results can proved that the proposed method has high embedding capacity and can preserve the image with no quality distortion.