It is not permissible to marry a zaani or zaaniyah unless they have repented
Question

Is it permissible to marry a woman who used to commit zina?.
Praise be to Allah.It is not permissible to marry a zaaniyah or zaani unless they have repented. If the man or woman has not repented then the marriage is not valid. 
Allah says (interpretation of the meaning): 
“The adulterer — fornicator marries not but an adulteress — fornicatress or a Mushrikah; and the adulteress –fornicatress, none marries her except an adulterer — fornicater or a Mushrik [and that means that the man who agrees to marry (have a sexual relation with) a Mushrikah (female polytheist, pagan or idolatress) or a prostitute, then surely, he is either an adulterer — fornicator, or a Mushrik (polytheist, pagan or idolater). And the woman who agrees to marry (have a sexual relation with) a Mushrik (polytheist, pagan or idolater) or an adulterer — fornicator, then she is either a prostitute or a Mushrikah (female polytheist, pagan, or idolatress)]. Such a thing is forbidden to the believers (of Islamic Monotheism)” [al-Noor 24:3]
There is a report concerning the reason for the revelation of this verse which makes the ruling clearer. Abu Dawood (2051) narrated from ‘Amr ibn Shu’ayb, from his father, from his grandfather, that Marthad ibn Abi Marthad al-Ghanawi used to smuggle prisoners from Makkah. There was in Makkah a prostitute called ‘Anaaq and she had been his friend. He said: I came to the Prophet (peace and blessings of Allah be upon him) and said: O Messenger of Allah, should I marry ‘Anaaq? He remained silent and did not answer me. Then the words “and the adulteress –fornicatress, none marries her except an adulterer — fornicater or a Mushrik” were revealed. He called me and recited them to me, and said: Do not marry her. Classed as saheeh by al-Albaani in Saheeh Abi Dawood. 
In ‘Awn al-Ma’bood it says: 
This indicates that it is not permissible for a man to marry a woman who has openly committed zina. This is indicated by the verse quoted in the hadeeth, because at the end of it, it says: “Such a thing is forbidden to the believers”. This clearly shows that it is haraam. End quote. 
Al-Sa’di (may Allah have mercy on him) said in his commentary on the verse quoted above: 
This shows that zina is abhorrent and that it tarnishes the honour of the one who does it in a way that other sins do not. We are told that no woman marries a zaani except a zaaniyah who is like him or a mushrikah who associates others with Allah and does not believe in the resurrection or reward and punishment, and does not obey the commands of Allah. The same applies to the zaaniyah: no one marries her but a zaani or a mushrik. “Such a thing is forbidden to the believers” means: it is forbidden for them to marry zaanis or zaaniyahs. 
What the verse means is that the one who marries a person, man or woman, who has committed zina and has not repented from that must be either a person who is not adhering to the rulings of Allah and His Messenger, so he cannot be anything but a mushrik, or he is adhering to the laws of Allah and His Messenger but he goes ahead with this marriage even though he knows about this zina, in which case the marriage is zina and immorality. If he were truly a believer in Allah, he would not do that. 
This clearly indicates that it is haraam to marry a zaaniyah until she repents, or to marry a zaani until he repents, because the partnership between a man and his wife or a woman and her husband is the closest of partnerships. Allah says (interpretation of the meaning): “Assemble those who did wrong, together with their companions” [al-Saaffaat 37:22].  Therefore Allah has forbidden that because of the great evil that it involves. It also implies a lack of protective jealousy and implies that children may attributed to the husband who are not his, the zaani will not be keeping her chaste because he is distracted by someone else. Any one of these would be sufficient for it to be haraam. End quote.  
Shaykh Ibn ‘Uthaymeen (may Allah have mercy on him) said something similar, and said that the meaning of the verse is that the one who believes that it is haraam to marry a zaaniyah but still marries her has entered into a haraam marriage contract which he believes is haraam. A haraam contract is like one that does not exist, so it is not permissible for him to be intimate with the woman; in that case the man will be a zaani. 
But if he denies that it is haraam to marry a zaaniyah and says that it is permissible, then in this case the man is a mushrik, because he has declared permissible something that Allah has forbidden and has made himself a lawmaker along with Allah. This is what we say to a man who gives his daughter in marriage to a zaani. 
Fatawa al-Mar’ah al-Muslimah, compiled by Ashraf ‘Abd al-Maqsood (2/698). 
This (i.e. that it is haraam to marry a zaaniyah) was stated in fatwas issued by Shaykh Muhammad ibn Ibraaheem (may Allah have mercy on him) and by the scholars of the Standing Committee for Issuing Fatwas, headed by Shaykh Ibn Baaz (may Allah have mercy on him). 
See: Fatawa Muhammad ibn Ibraaheem (10/135) and Fatawa al-Lajnah al-Daa’imah (18/383). 
Shaykh al-Islam Ibn Taymiyah said: 
Because of the punishment that Allah has decreed for those who commit zina, He made it haraam for the believers to marry them, as a rebuke to them and because of the sins and bad deeds that they have. … So (Allah) tells us that no one does that but a zaani or a mushrik. 
As for the mushrik, he has no faith that will deter him from committing immoral actions or keeping company with those who do them.  
As for the zaani, his immoral nature prompts him to do that even if he is not a mushrik. 
Allah has enjoined us to shun evil and its people so long as they are doing that, and this applies to the zaani.  
Allah has stipulated that men should be chaste and not immoral, as He says (interpretation of the meaning): “All others are lawful, provided you seek (them in marriage) with Mahr (bridal-money given by the husband to his wife at the time of marriage) from your property, desiring chastity, not committing illegal sexual intercourse” [al-Nisa’ 4:24]. This is something that should not be ignored because the Qur’aan has stated it clearly. 
As for the prohibition on marrying a zaaniyah, the fuqaha’, such as the companions of Ahmad and others, have discussed it and there are reports concerning it from the salaf. Although the fuqaha’ differed concerning it, those who said it is permissible do not have any reliable evidence."(Majmoo’ al-Fatawa  15/316) 
He also said (32/110): 
Marriage to a zaaniyah is haraam unless she repents, whether it was he or someone else who committed zina with her. This is undoubtedly the correct view, and it is the view of a number of the earlier and later generations, including Ahmad ibn Hanbal and others. 
This is what is indicated by the Qur’aan and Sunnah. The most well-known text concerning that is the verse in Soorat al-Noor where Allah says (interpretation of the meaning):  
“The adulterer — fornicator marries not but an adulteress — fornicatress or a Mushrikah; and the adulteress –fornicatress, none marries her except an adulterer — fornicater or a Mushrik [and that means that the man who agrees to marry (have a sexual relation with) a Mushrikah (female polytheist, pagan or idolatress) or a prostitute, then surely, he is either an adulterer — fornicator, or a Mushrik (polytheist, pagan or idolater). And the woman who agrees to marry (have a sexual relation with) a Mushrik (polytheist, pagan or idolater) or an adulterer — fornicator, then she is either a prostitute or a Mushrikah (female polytheist, pagan, or idolatress)]. Such a thing is forbidden to the believers (of Islamic Monotheism)” [al-Noor 24:3]
In the Sunnah, there is the hadeeth of Abu Marthad al-Ghanawi and ‘Anaaq. End quote. 
The one who is faced with this problem and who did a marriage contract before repenting has to repent to Allah and regret what he did, and resolve not to commit this sin again, then he should do the marriage contract again. 
And Allah knows best.