An algorithm is proposed for denoising the signal induced by cosmic strings in the cosmic microwave background. A Bayesian approach is taken, based on modelling the string signal in the wavelet domain with generalized Gaussian distributions. Good performance of the algorithm is demonstrated by simulated experiments at arcminute resolution under noise conditions including primary and secondary cosmic microwave background anisotropies, as well as instrumental noise.