The primordial power spectrum is an indirect probe of inflation or other structure-formation mechanisms. We introduce a new method, named PRISM, to estimate this spectrum from the empirical cosmic microwave background (CMB) power spectrum. This is a sparsity-based inversion method, which leverages a sparsity prior on features in the primordial spectrum in a wavelet dictionary to regularise the inverse problem. This non-parametric approach is able to reconstruct the global shape as well as localised features of the primordial spectrum accurately and proves to be robust for detecting deviations from the currently favoured scale-invariant spectrum. We investigate the strength of this method on a set of WMAP nine-year simulated data for three types of primordial spectra and then process the WMAP nine-year data as well as the Planck PR1 data. We find no significant departures from a near scale-invariant spectrum.