The polarization state of the optical electromagnetic field lying several nanometers above complex dielectric-air interfaces reveals the intricate light-matter interaction that occurs in the near-field zone. From the experimental point of view, access to this information is not direct and can only be extracted from an analysis of the polarization state of the detected light. These polarization states can be calculated by different numerical methods, well suited to near-field optics. In this paper, we apply two different techniques (localized Green's function method and differential theory of gratings) to separate each polarization component associated with both electric and magnetic optical near fields produced by nanometer sized objects. A simple dipolar model is used to get an insight into the physical origin of the near-field polarization state. In a second stage, accurate numerical simulations of field maps complete data produced by analytical models. We conclude this study by demonstrating the role played by the near-field polarization in the formation of the local density of states.