Using the worldline method, we derive an effective action of the bosonic sector of the Standard Model by integrating out the fermionic degrees of freedom. The CP violation stemming from the complex phase in the CKM matrix gives rise to CP-violating operators in the one-loop effective action in the next-to-leading order of a gradient expansion. We calculate the prefactor of the appropriate operators and give general estimates of CP violation in the bosonic sector of the Standard Model. In particular, we show that the effective CP violation for weak gauge fields is not suppressed by the Yukawa couplings of the light quarks and is much larger than the bound given by the Jarlskog determinant.