From 1 April, most people will have to pay for a lateral flow test in England.
It is part of the government's 'living with Covid' plan, although levels of the virus are high, with an estimated one in 16 people infected in the UK.
Some free testing will continue during April in Scotland and Northern Ireland.
In Wales the cut-off is July.
The general public has been discouraged from stockpiling test packs ahead of the change, but since ministers announced the end of the free testing programme for most of the population it has been difficult for many to access them.
The government says the end of universal free testing is possible because vaccines, along with antiviral drugs, are doing a good job of protecting people against severe Covid.
Although infections and hospitalisations with the virus have been rising in recent weeks, more than half of the patients in hospital who test positive are there for something else, rather than Covid.
Testing can be ramped up again should it be needed, such as if a new variant of concern emerges, the government says.
The new rules say that from 1 April in England, free testing will be provided for:
* Patients in hospital, where a PCR test is required for their care
* People who are eligible for community Covid drug treatments because they are at higher risk of getting seriously ill if they become infected. People in this group will be contacted directly and sent lateral flow tests to keep at home for use if they have symptoms, as well as being told how to reorder tests
* Care home residents
* People working in some high-risk settings, including care homes and prisons. These staff will be able to test regularly, without symptoms
People will also be tested before being discharged from hospital into care homes, hospices and refuges.
But most visitors to adult social care settings, and visitors to the NHS, prisons or places of detention will not be required to take a test.
Anyone who tests positive - whether they paid for a test or it was free - will be advised to try to stay at home and avoid contact with other people for five days, which is when they are most infectious.
Children and young people who are unwell and have a high temperature should stay at home. They can go back to nursery, school or college when they feel well enough and the fever has gone.
Dame Jenny Harries, Chief Executive of the UK Health Security Agency, said: "As we learn to live with Covid, we are focusing our testing provision on those at higher risk of serious outcomes from the virus, while encouraging people to keep following simple steps to help keep themselves and others safe.
"The pandemic is not over and how the virus will develop over time remains uncertain.
"Covid still poses a real risk to many of us, particularly with case rates and hospitalisations on the rise.
"That is why it is sensible to wear a mask in enclosed spaces, keep indoor spaces ventilated and stay away from others if you have any symptoms of a respiratory illness, including Covid."
The government also confirmed some other changes from 1 April:
* free parking for NHS staff introduced during the pandemic will end
* visiting restrictions in care homes with outbreaks will be reduced from 14 to 10 days