The bill, signed by president Mamnoon Hussain, will “safeguard the legitimate rights and interests of Hindu families”, a government statement said.
It will also allow Hindus to file for divorce and remarry, and will protect the financial security of women and children after divorce.
Ramesh Kumar Vankwani, head of the Pakistan Hindu Council, said the legislation would solve many problems faced by the community in Pakistan, where discrimination and violence against religious minorities is commonplace.
“This law is a welcome step … It will remove all difficulties for the registration of Hindu marriages,” he said.
Following the end of British rule in South Asia in 1947, the sub-continent was partitioned into mainly Hindu India and Pakistan, triggering widespread religious bloodshed in which hundreds of thousands were killed and millions displaced.
Since then, Pakistani Hindus – who number around 8.2 million in the country of an estimated 180 million people – have been unable to acquire the legal documentation needed to register marriages and annulments.
Lawmakers in the southern province of Sindh, where most Pakistani Hindus live, passed their own provincial legislation last year allowing Hindus to register marriages.