A proposal of a spin separator based on the spin Zeeman effect in Y-shaped nanostructure with a quantum point contact is presented. Our calculations show that the appropriate tuning of the quantum point contact potential and the external magnetic field leads to the spin separation of the current: electrons with opposite spins flow through the different output branches. We demonstrate that this effect is robust against the scattering on impurities. The proposed device can also operate as a spin detector, in which -- depending on the electron spin -- the current flows through one of the output branches.