We consider multiscale differential equations in which the operator varies rapidly over fine scales. Direct numerical simulation methods need to resolve the small scales and they therefore become very expensive for such problems when the computational domain is large. Inspired by classical homogenization theory, we describe a numerical procedure for homogenization, which starts from a fine discretization of a multiscale differential equation, and computes a discrete coarse grid operator which incorporates the influence of finer scales. In this procedure the discrete operator is represented in a wavelet space, projected onto a coarser subspace and approximated by a banded or block-banded matrix. This wavelet homogenization applies to a wider class of problems than classical homogenization. The projection procedure is general and we give a presentation of a framework in Hilbert spaces, which also applies to the differential equation directly. We show numerical results when the wavelet based homogenization technique is applied to discretizations of elliptic and hyperbolic equations, using different approximation strategies for the coarse grid operator.