A large number of exoplanets has been observed in the last three decades, but still for most of them we know comparatively little about the atmospheres of these distant planets. This is of particular interest as there exist types of planets that don't have an analogy in our own solar system, like hot Jupiters or super Earths. Studying these is instrumental in understanding planet and solar system formation. However just as planets are much smaller than their host stars, so is their signal in the observations. We therefore require high-precision measurements and analysis methods to study them. In this thesis I focus on ground-based high-resolution spectroscopy, as this allows us to use the information encoded in individual absorption lines of the spectrum. I developed tools for the entire process from the initial data reduction, over the analysis of the host star, to the final planet atmosphere characterization.The first tool I developed is PyReduce. It performs data reduction on raw observation images of high-resolution spectrographs by correcting for noise and bias in the data. Of special interest is the new extraction algorithm, which properly accounts for the optical distortions in the spectrograph, and thus improves the quality of the recovered spectrum.The second tool is PySME, which determines the fundamental parameters of the host stars, by modelling the stellar atmosphere and comparing it to the observed spectrum. Accurate stellar parameters help us understand the star-planet system, especially regarding the stellar irradiation on the planet which is important for the temperature. Finally I created ChEATS to determine the chemical components of the planet atmosphere using the cross-correlation method. This method combines all observed spectral lines to detect the faint planet signal in the data. We show that these tools provide excellent analyses in the papers presented here. Additionally PyReduce and PySME are in active use by scientists all over the world. Finally we present an analysis of WASP-107 b, in which we detect H2O and CO in the planet atmosphere.Zoom Room: https://uu-se.zoom.us/j/63222657226</p