This paper proposes a novel adaptive filter for removing salt and pepper noise from images using fuzzy logic. The filter has two stages: detection and filtering. In the detection stage, a 3x3 pixel window is used to identify noisy pixels. Pixels with maximum or minimum intensities are identified as salt or pepper noise. In the filtering stage, the detected noisy pixels are passed through merge scanning and histogram processing to remove noise while preserving image details. Simulation results on standard test images show the filter can remove up to 95% salt and pepper noise while maintaining high PSNR and processing speed.