High-pressure Raman scattering and synchrotron X-ray diffraction measurements of sodium squarate (Na(2)C(4)O(4), SS) are performed in a diamond anvil cell. SS possesses a rare, but typical structure, which can show the effect of face-to-face π-stacking without interference of other interactions. At ~11 GPa, it undergoes a phase transition, identified as a symmetry transformation from P2(1)/c to P2(1). From high-pressure Raman patterns and the calculated model of SS, it can be proved that the phase transition results from the distorted squarate rings. We infer it is the enhancement of π-stacking that dominates the distortion. For comparison, high-pressure Raman spectra of sodium squarate trihydrate (Na(2)C(4)O(4)●3H(2)O, SST) are also investigated. The structure of SST is determined by both face-to-face π-stacking and hydrogen bonding. SST can be regarded as a deformation of SS. A phase transition, with the similar mechanism as SS, is observed at ~10.3 GPa. Our results can be well supported by the previous high-pressure studies of ammonium squarate ((NH(4))(2)C(4)O(4), AS), and vice versa. High-pressure behaviors of the noncovalent interactions in SS, SST, and AS are compared to show the impacts of hydrogen bonding and the role of electrostatic interaction in releasing process.