Given a function $f$ and its Fourier transform $\hat{f}$, then the function
$$F=f^2+\hat{f}\star\hat{f},$$
with $\star$ the convolution, is its own Fourier transform: $\hat{F}=F$.
If we require that $F$ is a probability density (absolutely integrable and positive semi-definite), then any $F$ with $\hat{F}=F$ is of this form, see A. Nosratinia, Self-characteristic distributions. The decomposition is not unique, one realization is $f=\sqrt{F/2}$.