In this work, we report the structural phase transformation of tetragonal inverse-perovskite REPtB (RE = Sm, and Gd-Tm) compounds to cubic perovskite structure, with a large volume reduction of about 9% (reduction of the c axis, ∼17%; increase in the a axis, ∼5%). The structural stability of the cubic phase, however, could only be maintained by lowering the lattice parameter of the off-stoichiometric REPtB (x < 1), formed in the process of annealing. The combined effect of phase transformation and stoichiometric defects is argued to be responsible for the observed volume collapse. Unexpectedly, the application of a large hydrostatic pressure of ∼20 GPa does not have any significant effect on the crystal structure. Neutron diffraction studies and heat capacity measurements unambiguously confirm different magnetic transition temperatures in the tetragonal and cubic phases. The different physical properties of these two phases demonstrate the interrelationship between the crystal chemistry and the physics of the system. The synthetic route to cubic REPtB identified in this work may be utilized to prepare new ternary rare-earth intermetallics in a cubic perovksite form, which was previously found to facilitate unconventional superconductivity.