Joint Photographic EXPERTS Group (JPEG) is one of the most widely used image compression methods, but it causes annoying blocking artifacts at low bit-rates. Sparse representation is an efficient technique which can solve many inverse problems in image processing applications such as denoising and deblocking. In this paper, a post-processing method is proposed for reducing JPEG blocking effects via sparse representation. In this method, a dictionary is learned via the single input blocky image using KSVD. There is no need for any prior knowledge about the blocking artifacts. Experimental results on various images demonstrate that the proposed post-processing method can efficiently alleviate the blocking effects at low bit-rates and outperform some new well-known image deblocking methods.