Liquid crystal based spatial light modulators are widely used in applied optics due to their ability to continuously modulate the phase of a light field with very high spatial resolution. A common problem in these devices is the pixel crosstalk, also called the fringing field effect, which causes the response of these devices to deviate from the ideal behavior. This fringing effect decreases the performance of the spatial light modulator and is shown to cause an asymmetry in the diffraction efficiency between positive and negative diffraction orders. We use simulations of the director distribution to reproduce diffraction efficiency measurements of binary and blazed gratings. To overcome these limitations in performance, the simulations of the director distribution in the liquid crystal layer are used to develop a fast and precise model to compute the phase response of the spatial light modulator. To compensate the fringing field effect, we implement this model in phase retrieval algorithms and calculate the phase profile corresponding to a regular spot pattern as a generic example. With this method, we are able to increase the spot uniformity significantly compared to a calculation without considering the fringing field effect. Additionally, polarization conversion efficiencies of various simple phase patterns are simulated and measured for different orientations of the spatial light modulator. We found that the polarization conversion has the the smallest effect for a setup in which the liquid crystal molecules at the alignment layer lie in the plane of incidence of the light beam.