A novel macrocyclic DO3A derivative containing a linear diamine pendant arm, H3do3aNN, was prepared and its protonation and complexation properties were studied by means of potentiometry. It determined ligand consecutive protonation constants log K(An) = 12.62, 10.28, 9.67, 8.30, 3.30 and 1.58 and stability constants of selected lanthanide (Eu(iii), Yb(iii)) complexes log K(EuL) = 23.16 and log KYbL = 22.76. The complexes could be protonated on the pendant amino group(s) with log K(HLM) ≈ 5.6 and log K(H2LM) ≈ 4.8. Solution structures of both complexes were studied by NMR spectroscopy. The study revealed that the complex species exist exclusively in the form of twisted-square-antiprismatic (TSA) isomers. The complexes show significant pH dependence of the Chemical Exchange Saturation Transfer (CEST) between their amino groups and the bulk water molecules in the pH range of 5-8. Thus, the pH dependence of the magnetization transfer ratio of CEST signals can be used for pH determination using magnetic resonance imaging techniques in a pH range relevant for in vivo conditions.