You will need to obtain a visa or entry clearance as either a fiancé/e or a marriage visitor.
You should apply for a fiancé/e visa or entry clearance if you are planning to travel to marry someone already in the UK and you plan to stay in the country.
You should apply for a marriage visitor visa or entry clearance if you only want to visit the UK to get married, but do not plan to stay for more than six months.
These rules apply, even if you are a national of a country where there is normally no need for a visa to enter the UK. You will not be able to give notice to marry to a Registrar without the correct valid sticker in your passport or travel document.
You should apply for your visa or entry clearance at a British Embassy, Consulate, or High Commission in your country of origin, or in the country overseas where you are normally resident. A fee, currently £36, is payable for this service.
In the case of a fiancé/e, both parties to the marriage must be over 18, if the couple are planning to stay in the UK.
Now read the section "Giving notice to marry at a designated Register Office".
Next: I want to get married in the UK and I am already in the country