We consider sample covariance matrices of the form $X^*X$, where $X$ is an $M times N$ matrix with independent random entries. We prove the isotropic local Marchenko-Pastur law, i.e. we prove that the resolvent $(X^* X - z)^{-1}$ converges to a multiple of the identity in the sense of quadratic forms. More precisely, we establish sharp high-probability bounds on the quantity $langle v, (X^* X - z)^{-1} w rangle - langle v,w rangle m(z)$, where $m$ is the Stieltjes transform of the Marchenko-Pastur law and $v, w in mathbb C^N$. We require the logarithms of the dimensions $M$ and $N$ to be comparable. Our result holds down to scales $Im z geq N^{-1+epsilon}$ and throughout the entire spectrum away from 0. We also prove analogous results for generalized Wigner matrices.