A process for producing 1,4,7,10-tetraazacyclododecane-1,4,7,10-tetraacetic acid (DOTA) including salts and hydrates thereof of general formula (I) from the respective cyclen.The process involves the use of cationic- and anionic exchange resins and solvent treatments to remove the organic and inorganic contaminants. Any cations present in the raw DOTA or other contaminants resulting from the reaction of cyclen are largely reduced in early stages of the process allowing to obtain good yields of DOTA in a purified grade and in an easier and reliable way. The process is useful for the production of DOTA, of macrocyclic compounds including metal ions complexes thereof and of compositions including the macrocyclic compounds that can be used as contrast agents for magnetic resonance imaging.