We investigate the properties of magnetized Coulomb crystals in neutron star crusts using a fully three-dimensional geometry with periodic boundary conditions. The electron density profiles are fixed via the Thomas-Fermi approximation, and the nonuniform magnetic fields are treated with the equivalent magnetic charge method. The study focuses on Coulomb crystals composed of 12C at an ion number density nd=10−9fm−3, subjected to various external magnetic fields. Nuclei are described by a Gaussian wave function, where the width b encapsulates the effects of zero-point ion vibrations and finite temperature. Our findings show that the crystal softens as b increases. The Madelung constant KM fluctuates with the external magnetic field Bz0 at Bz0≤3×1014 G. At higher field strengths, KM increases until Bz0≈3×1015 G and then decreases. The body-centered cubic (BCC) lattice is slightly more stable than the face-centered cubic (FCC) lattice when Bz0<3×1015 G, whereas the FCC lattice may become more stable at larger Bz0. The elastic constants c11−c12 and c44 are computed and tabulated, which grow with Bz0 for 3×1014G≲Bz0≲2×1015 G and then decline toward zero as the field strength increases further. For Bz0≳1016 G, it becomes difficult to identify a stable lattice structure. These results provide valuable insights into the role of strong magnetic fields in shaping the properties of Coulomb crystals in compact stars.