Protesters gathered at the House of Terror Museum in the capital, Budapest, which commemorates victims of Nazism and Communism, and marched to the headquarters of the governing Fidesz party.
Criticizing Prime Minister Viktor Orban, some chanted: "Victator."
The government, which is at odds with many other European Union member states over rule-of-law and democracy issues, has not commented on the allegations beyond saying Hungary's intelligence-gathering is conducted lawfully.
A report by a group of 17 international media organizations and Amnesty International this month said the Pegasus spyware, made and licensed by Israeli company NSO, was used in hacking and attempts to hack smartphones belonging to journalists, human rights activists and government officials in several countries.
Direkt36, the Hungarian partner in the group of media outlets, said those targeted for surveillance included journalists, businessmen, lawyers and people critical of the Hungarian government.
Hungarian prosecutors have launched an investigation into multiple complaints received since the reports.
NSO has said its product was intended only for use by vetted government intelligence and law enforcement agencies to fight terrorism and crime.
In Hungary, which was ruled by communists for four decades after World War Two, the minister of justice approves surveillance in matters of national security.