The paper discusses the removal of salt and pepper noise by using various median filters for various test images. It gives a better idea and analysis of different median filter algorithms for the restoration of various gray scale images that are corrupted by salt and pepper noise. The performance of different median filters, such as Standard Median Filter (MF), Adaptive Median Filter (AMF), Adaptive Weighted Algorithm (AWA), Switching Median Filter (SMF), Decision-Based Algorithm (DBA) and Modified Decision-Based Unsymmetric Trimmed Median Filter (MDBUTMF), is compared by using Mean Square Error (MSE) and Peak Signal-to-Noise Ratio (PSNR) obtained from the simulation results for different images.