Skip to main content
Sexual health & STI prevention

HIV PrEP and PEP: how they work, who they are for and how to get them

AltFTool Health Editorial TeamFact-checked 7 min read

Quick answer

PrEP (pre-exposure prophylaxis) is medicine that HIV-negative people take before possible exposure to greatly reduce their chance of getting HIV. PEP (post-exposure prophylaxis) is an emergency course of medicine started after a possible exposure, as soon as possible and within 72 hours. Both need a clinician, and neither protects against other STIs.

Key points

  • PrEP is taken before possible exposure and is highly effective at preventing HIV when taken as prescribed.
  • PEP is an emergency treatment that must be started within 72 hours of a possible exposure; the sooner, the better.
  • You need an HIV test before starting PrEP and regular check-ups while you take it.
  • People living with HIV who keep an undetectable viral load on treatment do not pass HIV on through sex (U=U).
  • PrEP and PEP do not protect against other STIs or pregnancy, so condoms and testing still matter.

What is PrEP and how does it work?

PrEP stands for pre-exposure prophylaxis. It is antiretroviral medicine taken by people who do not have HIV to stop the virus from establishing an infection if they are exposed. The most common form is a tablet. Long-acting injections given every few months are also approved in some countries.

When taken as prescribed, PrEP is one of the most effective HIV prevention tools available. The CDC reports that it reduces the risk of getting HIV from sex by about 99%. It works much less well if doses are missed, so a clinician will explain how and when to take the form you are prescribed and how long it takes to become protective.

Who should consider PrEP?

PrEP is recommended for anyone whose circumstances put them at higher likelihood of HIV exposure. It is used by people of all genders and sexual orientations, and asking about it says nothing about your character; it is a sensible health decision.

  • You have a partner living with HIV who does not have an undetectable viral load, or whose status you do not know.
  • You do not always use condoms with new or casual partners.
  • You have recently had an STI such as syphilis or gonorrhoea.
  • You have used PEP more than once.
  • You share injecting equipment.

How do you get PrEP?

PrEP needs a prescription. Before you start, a clinician will test you for HIV, because PrEP alone is not a treatment for HIV and taking it with an undiagnosed infection can lead to drug resistance. You will usually also have tests for other STIs, hepatitis B and kidney function.

While you take PrEP you will have regular check-ups, typically every few months, including repeat HIV and STI tests. In the UK, PrEP is free from NHS sexual health clinics. Availability and cost vary in other countries, so a sexual health clinic, HIV service or doctor is the best place to ask. Most people have few or no side effects; mild stomach upset in the first weeks is common and usually settles.

What is PEP and when do you need it?

PEP stands for post-exposure prophylaxis. It is a 28-day course of HIV medicine for someone who may have been exposed to HIV, for example after sex without a condom with a partner who may have HIV, a condom breaking, sexual assault or sharing injecting equipment.

PEP must be started as soon as possible, ideally within 24 hours and no later than 72 hours after the possible exposure. It is not effective if started later. Ask for it urgently at a sexual health clinic or a hospital emergency department. A clinician will assess your risk, test you for HIV, and arrange follow-up testing after the course ends. PEP is for emergencies; if you might need it more than once, ask about PrEP.

What does U=U mean?

U=U stands for Undetectable = Untransmittable. A person living with HIV who takes effective treatment and keeps an undetectable viral load, confirmed by regular blood tests, does not pass HIV on to sexual partners. This is supported by large international studies and endorsed by the WHO, CDC and NHS.

U=U is one of the strongest reasons to test early and start treatment. It also means that PrEP is not always needed in a relationship where a partner with HIV maintains an undetectable viral load, which is worth discussing with a clinician.

What do PrEP and PEP not protect against?

PrEP and PEP only prevent HIV. They do not protect against other STIs such as chlamydia, gonorrhoea, syphilis, herpes or HPV, and they do not prevent pregnancy. Condoms, vaccines and regular STI testing remain important, and you may also need contraception.

When to see a doctor

  • Go to a sexual health clinic or emergency department straight away if you may have been exposed to HIV in the last 72 hours.
  • Seek urgent care and ask about PEP after a sexual assault; you can also ask about emergency contraception and support services.
  • Contact your clinic if you have a fever, sore throat, rash or flu-like illness while taking PrEP or soon after possible exposure.
  • Speak to a clinician before stopping or restarting PrEP, so you stay protected.

Frequently asked questions

How soon do I need to start PEP?

As soon as possible. PEP works best when started within 24 hours of a possible exposure and must be started no later than 72 hours afterwards. Go to a sexual health clinic or hospital emergency department and explain that you need PEP. Do not wait for symptoms or for a clinic appointment on another day.

Does PrEP protect against other STIs?

No. PrEP only prevents HIV. It does not protect against chlamydia, gonorrhoea, syphilis, herpes, HPV or other infections, and it does not prevent pregnancy. That is why PrEP services include regular STI testing, and why condoms are still recommended. Many people combine PrEP, condoms and vaccination for the broadest protection.

Can I get PrEP without an HIV test?

No. You need a negative HIV test before starting PrEP and regular tests while you take it. PrEP medicine is not enough to treat HIV, so taking it with an undiagnosed infection could allow the virus to become resistant to important drugs. The test is quick, and a clinician or pharmacist will advise on everything else.

Can someone with HIV have a healthy sex life?

Yes. People living with HIV who take effective treatment and keep an undetectable viral load do not pass HIV on through sex, which is known as U=U. With treatment, people with HIV can expect a near-normal life expectancy, have relationships and, with medical support, have children without passing on the virus.

  • Sexual health

    STI testing: when to get tested, how it works and what to expect

    Get tested for sexually transmitted infections (STIs) if you have symptoms, a new partner, unprotected sex or a partner who has an STI, and as part of routine check-ups. Most tests use a urine sample, a swab or a blood test, are confidential, and many infections cause no symptoms, so testing is the only way to know.

    7 min read

  • Sexual health

    Safer sex basics: condoms, dental dams, vaccines and testing

    Safer sex means combining a few simple habits that lower the chance of passing on or catching a sexually transmitted infection (STI): using a condom or dental dam correctly every time, choosing a lubricant that will not damage it, getting vaccinated against HPV and hepatitis B, and testing regularly. No single method removes all risk, but together they protect you well.

    7 min read

  • Consent & communication

    How to talk about sexual health with a partner: a practical guide

    Talking about sexual health with a partner means discussing STI testing, contraception and personal boundaries before you become intimate, ideally at a calm, private moment. Using simple, non-judgemental phrases and sharing your own information first makes the conversation easier and shows care for both of you.

    6 min read