Most of picture coding standards, including H.263, use the block-based processing for the motion estimation and the discrete cosine transform (DCT). This block-based processing induces the well-known coding artifacts, in particular, when an image is highly compressed. The typical coding artifacts are the grid noise in the monotone area and the staircase noise along the image edges. In this paper, we propose a new filtering method for the removal of the grid noise and the staircase noise. Here, a signal adaptive lowpass filter is used to smooth the pixels in the monotone area and the pixels that are close to an edge. As for the pixels at edges, a new criterion is introduced to reduce the staircase noise and ringing noise without blurring the edge sharpness. In addition, space-variant lowpass filter is used at block boundaries to reduce the grid noise if the difference of the slope of intensity across the block boundaries and that of their neighbors is high. We apply this method to the post filter and the loop filter in H.263 of CIF and QCIF resolution sequence. The proposed filter has 0 ~1dB gain in PSNR, and the EBM (Edge adaptive Blocking artifacts Measure), a new criterion, is improved as well as the subjective image quality.