Insights to the fundamental processes that occur during the manufacturing of niobium superconducting radio-frequency (SRF) cavities are provided via analyses of density functional theory calculations and Raman, infrared, and nuclear magnetic resonance (NMR) spectra. I show that during electropolishing fluorine is bound and released by the reaction of the acid components in the solution: HF + H 2 SO 4 <−> HFSO 3 + H 2 O. This result implies that new recipes can possibly be developed on the principle of controlled release of fluorine by a chemical reaction. I also show that NMR or Raman spectroscopy can be used to monitor the free fluorine when polishing with the standard electropolishing recipe.Density functional theory was applied to calculate the properties of common processing impurities -hydrogen, oxygen, nitrogen, and carbon -in the niobium. These impurities lower the superconducting transition temperature of niobium, and hydride precipitates are at best weakly superconducting. I modeled several of the niobium hydride phases relevant to SRF cavities, and explain the phase changes in the niobium hydrogen system based on the charge transfer between niobium and hydrogen and the strain field inside of the niobium. I also present ACKNOWLEDGEMENTS 5LIST OF ACRONYMS AND SYMBOLS 7 TABLE OF CONTENTS LIST OF TABLES LIST OF FIGURES 1. INTRODUCTION 2. BACKGROUND Superconducting Radio-Frequency Cavity Design and Material Fundamentals Impurities in Niobium Superconducting Radio-Frequency Cavity Processing Superconducting Radio-Frequency Cavity Performance Limitations 3. METHODS Calculations Based on Density Functional Theory Experimental Tools 4. ELECTROPOLISHING SOLUTION ANALYSES Abstract Introduction Methods Results Raman Spectra Infrared Spectra Nuclear Magnetic Resonance Spectra Discussion