The upper house of parliament, the Council of States, has overwhelming voted for stalking or harassment to be a specific offence.
The Federal Council is also known to be in favour of a new law.
The number of people complaining of being stalked or harassed has increased in the last few years, mainly because of social media.
Some parliamentarians voted against the plan, saying the wording was too broad or existing laws can already be used.
It still needs to be voted on by the lower house, the National Council.