A general theory to factorize the Wiener-Hopf (W-H) kernel using Fredholm Integral Equations (FIE) of the second kind is presented. This technique, hereafter called Fredholm factorization, factorizes the W-H kernel using simple numerical quadrature. W-H kernels can be either of scalar form or of matrix form with arbitrary dimensions. The kernel spectrum can be continuous (with branch points), discrete (with poles), or mixed (with branch points and poles). In order to validate the proposed method, rational matrix kernels in particular are studied since they admit exact closed form factorization. In the appendix a new analytical method to factorize rational matrix kernels is also described. The Fredholm factorization is discussed in detail, supplying several numerical tests. Physical aspects are also illustrated in the framework of scattering problems: in particular, diffraction problems. Mathematical proofs are reported in the paper.