Echelle spectrographs currently provide some of the most precise and detailed spectra in astronomy, the interpretation of which sometimes depends on the wavelength calibration accuracy. In some applications, such as constraining cosmological variations in the fundamental constants from quasar absorption lines, the wavelength calibration is crucial. Here we detail an algorithm for selecting thorium–argon (ThAr) emission lines for wavelength calibration which incorporates the properties of both a new laboratory wavelength list and the spectrograph of interest. We apply the algorithm to the Very Large Telescope Ultraviolet and Visual Echelle Spectrograph (UVES) and demonstrate a factor of ≳3 improvement in the wavelength calibration residuals (i.e. random errors) alone. It is also found that UVES spectra calibrated using a previous, widely distributed line-list contain systematic ±30 –75 m s−1 distortions of the wavelength scale over both short and long wavelength ranges. These distortions have important implications for current UVES constraints on cosmological variations in the fine-structure constant. The induced systematic errors are most severe for Mg/Feii quasar absorbers in the redshift range 1.2 ≲zabs≲ 2.3, with individual absorbers studied by recent authors containing systematic errors up to four times larger than quoted statistical errors.