Thinning is an interesting and challenging problem, and plays a central role in reducing the amount of information to be processed during pattern recognition, image analysis and visualization, computer-aided diagnosis. A topology preserving thinning algorithm is used which removes the pixels from a gray scale images. First it checks for the condition whether a pixel is acyclic or not. If a pixel is acyclic, then it is removed from the image else retains in the image. A topology preserving skeleton is a synthetic representation of an object that retains its shape, topology, geometry, connectivity and many of its significant morphological properties. It has been observed in our experiments that thinning algorithm is stable and robust and yield promising performance for wide range of images.