This work aims to study Magnesium sensor based on Eriochrome black T complex. The absorbance of Eriochrome black T can be detected by UV-Visible spectrophotometer and each of conditions shows different result. The fluorescent spectrum emission of nanomaterial and fluorescent dyes in Eriochrome black T system by Fluorescence spectrophotometer is found only Fluorescein that emit spectrum same range with Eriochrome black T absorbtion at 514 nm and the experimental result matched theory. So Fluorescein is choosed to study in various conditions in Eriochrome black T system with Mg2+ and no Mg2+. The result show that emission of Fluorescein is proportional to the concentration of Fluorescein and inverse to concentration of Mg2+ and Eriochrome black T. When using both techniques can conclude that the Fluorescence spectroscopy can detect Mg2+ better than UV-Visible spectroscopy. However, when add other metals in system. Eriochrome black T can be complex compound with many metals.