The Hammurabi code is a publicly available C++ code for generating mock polarized observations of Galactic synchrotron emission with telescopes such as LOFAR, SKA, Planck, and WMAP, based on model inputs for the Galactic magnetic field (GMF), the cosmic-ray density distribution, and the thermal electron density. The Hammurabi code allows one to perform simulations of several different data sets simultaneously, providing a more reliable constraint of the magnetized ISM.