The encoding and decoding principle of the Hadamard transform spectrometer with a 2D slit-array mask is described in this paper. Based on the Hadamard transform theory, the signal-to-noise ratio (SNR) enhancement of a 2D slit-array Hadamard transform spectrometer is deduced and verified experimentally. Affected by the optical system of the spectrometer, there are differences between the experimental results and theoretical calculations. At the end of this paper, we discuss the influence of the spectrometer's optical system on the SNR enhancement based on the spatial frequency analysis.