Precursors of the crystalline antiperovskites A3−xHxOCl (A = Li or Na and 0 < x < 1) can be rendered glass/amorphous solid Li+ or Na+ electrolytes by the addition of water to its solvation limit with/without the addition of a small amount of an oxide or hydroxide.