In this paper, we are interested in density estimation using kernels that can take negative values, also called negative kernels. On the one hand, using negative kernels allows reducing the bias of the approximation, but on the other hand it implies that the resulting approximation can take negative values. To obtain a new approximation which is a probability density, we propose to replace the approximation by its L/sup 2/-projection on the space of L/sup 2/-probability densities. A similar approach has been proposed in I.K. Glad et al. (2003) but, in this paper, we describe how to compute this projection and how to generate random variables from it. This approach can be useful for particle filtering, particularly for the regularization step in regularized particle filters (C. Musso and N. Oudjane, June 1998) or kernel filters (M. Hurzeler and H.R. Kunsch, June 1998).