The main goal of this work is to prove a symplectic non-squeezing result for the Korteweg--de Vries (KdV) equation on the line $\R$. This is achieved via a finite-dimensional approximation argument. Our choice of finite-dimensional Hamiltonian system that effectively approximates the KdV flow is inspired by the recent breakthrough in the well-posedness theory of KdV in low regularity spaces \cite{KV18}, relying on its completely integrable structure. The employment of our methods also provides us with a new concise proof of symplectic non-squeezing for the same equation on the circle $\T$, recovering the result of \cite{CKSTT}.