AbstractWe prove that every properly edge-colored n-vertex graph with average degree at least $$32(\log 5n)^2$$ 32 ( log 5 n ) 2 contains a rainbow cycle, improving upon the $$(\log n)^{2+o(1)}$$ ( log n ) 2 + o ( 1 ) bound due to Tomon. We also prove that every properly edge-colored n-vertex graph with at least $$10^5 k^3 n^{1+1/k}$$ 10 5 k 3 n 1 + 1 / k edges contains a rainbow 2k-cycle, which improves the previous bound $$2^{ck^2}n^{1+1/k}$$ 2 c k 2 n 1 + 1 / k obtained by Janzer. Our method using homomorphism inequalities and a lopsided regularization lemma also provides a simple way to prove the Erdős–Simonovits supersaturation theorem for even cycles, which may be of independent interest.