We introduce 3D permanent magnetic lattices for ultracold atoms which can be created by arbitrary number of 2D arrays of square permanent magnetic slabs plus a bias magnetic field. Instead of the square magnets, we can also use magnetic films with square holes. We find analytical expressions for the location of the nonzero magnetic field minima and physical quantities such as trap depths, absolute value of the magnetic field and curvatures as well as trap frequencies at each minimum. We show that most of them, including the trap depths, modulation depths, and trap frequencies can be controlled by the bias field. Accessible trap depths and trap frequencies in the permanent magnetic lattices are much higher compared to the optical lattices. Between the magnetic layers, the trap frequencies are higher compared to above the top layer (under the bottom layer). In principle, our method can be generalized to other 2D permanent magnetic lattices and we show how to transform a 2D lattice of a given geometry into 3D by using multiple layers of magnets.