Hilbert spectroscopy is based on a frequency-selective detection of electromagnetic radiation by a Josephson junction described by the resistively shunted junction (RSJ) model. The YBa2Cu3O7−x grain-boundary junctions fabricated on NdGaO3 bicrystals were found to be close to the RSJ model. General-purpose Hilbert spectrometers were developed and characterized using voltage-biased low-resistance junctions. The spectral bandwidth of Hilbert spectroscopy was shown to be of several frequency decades for any junction temperature between 48 and 85 K. A total bandwidth from 6 GHz to 2.5 THz has been covered using one junction at different temperatures. The spectral resolving power f/δf of Hilbert spectroscopy was found to be of three orders in the terahertz range. The dynamic range of intensities of electromagnetic radiation in Hilbert spectroscopy was shown to be of five orders.