Pulsars are remarkable objects that emit across the entire electromagnetic spectrum , providing a powerful probe of the interstellar medium . In this study , we investigate the relation between dispersion measure ( DM ) and X-ray absorption column density N _ { \mathrm { H } } using 68 radio pulsars detected at X-ray energies with the Chandra X-ray Observatory or XMM-Newton . We find a best-fit empirical linear relation of N _ { \mathrm { H } } ( 10 ^ { 20 } cm ^ { -2 } ) = 0.30 ^ { +0.13 } _ { -0.09 } DM ( pc cm ^ { -3 } ) , which corresponds to an average ionization of 10 ^ { +4 } _ { -3 } % , confirming the ratio of one free electron per ten neutral hydrogen atoms commonly assumed in the literature . We also compare different N _ { \mathrm { H } } estimates and note that some N _ { \mathrm { H } } values obtained from X-ray observations are higher than the total Galactic H i column density along the same line of sight , while the optical extinction generally gives the best N _ { \mathrm { H } } predictions .