An optimal beam splitter using the polarization mode modulation technique in different alignments of layered hyperbolic metamaterials is presented. The transmission and reflection modes in different arrangements of layered HMMs are studied in the presence of TM and TE waves by analyzing dispersion relations. Results show a duality in the mode modulations between structures aligned in the Y and Z axes. The response of one structure to a beam with zero polarization in terms of transmission and reflection is the same as the response of another to a beam with 90-degree polarization. We utilize this approach to propose a polarizing beam splitter (PBS) based on layered Ag-SiO2 unit cell HMM. FDTD simulations show that in a structure with two complementary outputs, when one of the outputs is in transmission mode, the other output is in reflection mode, and when the incident wave mode is changed from TM to TE, the operating modes of the outputs are reversed. Our structure can be used from 340 nm to Mid-IR with a high extinction ratio, and considering that the outputs work independently, the proposed PBS can prevent the destructive effect of waveguides on each other, which limits conventional beam splitters based on HMMs.