Intentionally waving a Nazi flag in NSW or displaying memorabilia bearing swastikas can land a person in jail for up to a year, along with a fine of over $100,000.
The Crimes Amendment (Prohibition on display of Nazi symbols) Bill 2022 swiftly passed in the upper house on Thursday with unanimous support.
It comes after an inquiry earlier this year recommended a ban on the public display of Nazi symbols in a bid to tackle rising anti-Semitism.
NSW becomes the second state in Australia to pass the landmark legislation after Victoria in June.
NSW Jewish Board of Deputies CEO Darren Bark described the passing of the law as a historic day for NSW.
"Nazi symbols are a gateway to violence and are used as a recruitment tool by extremists," he said.
The Holocaust is the genocide perpetrated by the Nazi regime in Germany that killed some six million Jews and other minority groups including gay people, Black people and Roma people during the World War II.