How long after sex can you test for an STD?
It depends on the infection and the test. Brook, a UK sexual-health charity, says chlamydia and gonorrhoea can take two weeks to show up and HIV six to seven weeks; CDC says rapid and self-tests can take up to 90 days. With symptoms or a possible HIV exposure within 72 hours, contact a clinic now.

It depends on the infection and on the test. No test picks up an infection the moment it happens; the gap between a possible exposure and the point a test can reliably detect it is called the window period. Testing inside the window is not wasted, because it still checks for anything from before, but a negative result may not yet include your most recent encounter.
For chlamydia and gonorrhoea, Brook, the UK sexual-health charity the NHS links to for testing advice, says they can take two weeks to show up on a test after sex without a condom or barrier (Brook, Getting tested for STIs). The NHS puts it more broadly: STIs can take up to 7 weeks to show up on a test, so if you do not have symptoms it is best to wait 7 weeks (NHS, Sexually transmitted infections, reviewed 2024). These tests use a urine sample or a swab. If you have had oral or anal sex, ask about throat and rectal swabs, which CDC says people should discuss with their provider (CDC, Getting Tested for STIs, 2026).
For HIV, CDC gives a window for each type of test: a lab test on blood from a vein that looks for both antigen and antibodies can usually detect HIV 18 to 45 days after exposure; a rapid finger-stick antigen/antibody test, 18 to 90 days; antibody tests, which include most rapid tests and self-tests, 23 to 90 days; and a nucleic acid test (NAT), 10 to 33 days (CDC, Getting Tested for HIV, 2026). If you test negative inside the window, CDC advises testing again once the window for that test has passed. If the possible exposure was within the last 72 hours, ask a clinic, urgent care or emergency room about PEP straight away; CDC says it must be started within 72 hours (CDC, Preventing HIV with PEP, 2024).
Syphilis is checked with a blood test, and none of the sources we opened gives a single window period we can quote. The NHS notes that first symptoms can take 3 weeks or more to appear (NHS, Syphilis, reviewed 2026). If you are testing after a specific encounter, ask the clinic whether a repeat blood test later on makes sense for you.
Herpes and HPV work differently, so waiting longer does not produce a clean answer. The NHS says a herpes swab test needs visible blisters or sores (NHS, Genital herpes), and CDC does not recommend herpes blood-test screening for the general population, though its clinical guidance says it can be considered for people with several partners who come in for an STI check (CDC STI Treatment Guidelines, screening recommendations). CDC also says there is no test to find out a person's HPV status; HPV tests are used for cervical cancer screening in women aged 30 and over (CDC, About Genital HPV Infection, 2025). For either, see a clinician about any new sore, bump or skin change rather than timing a test.
If you think you tested too early, use the window that belongs to the test you took rather than a fixed schedule. Brook says that without symptoms it is best to wait the full window — at least two weeks for chlamydia and gonorrhoea and six to seven weeks for HIV — and the NHS is broader still, advising a wait of 7 weeks if you do not have symptoms. CDC's advice is to test again once the window for that test has passed, and to go straight away if you have symptoms or a possible HIV exposure inside the last 72 hours. Brook's general rule for a routine rhythm is to test every time you have sex with someone new, every three months, or every year if you are in an exclusive relationship (Brook, Getting tested for STIs).
A result is a snapshot of the day the sample was taken, so share the date and what was tested with the partners who need it, and never share results with an app or platform. JoinTheSwing does not provide testing or verify anyone's sexual health. This is general information, not medical advice; a sexual-health clinic can tell you exactly what to test for and when, and the JoinTheSwing STD testing guide covers a practical rhythm.
How this answer was checked.
Written by JoinTheSwing editorial and not reviewed by a clinician; general information, not medical advice. Every window period above is quoted from the CDC, NHS or Brook page it is attributed to, opened on the review date. Where no opened source gave a figure, as for syphilis, we say so and point to a clinic instead of estimating one.
Chlamydia and gonorrhoea can take two weeks to show up on STI tests after unprotected sex, and HIV six to seven weeks; without symptoms it is best to wait that long; the general rule for testing is every time you have sex with someone new, every three months, or every year if you are in an exclusive relationship; urine, swab and blood samples.
- NHS (UK National Health Service)
Sexually transmitted infections (STIs) (reviewed May 13, 2024) (opens in a new tab)
STIs can take up to 7 weeks after unprotected sex to show up on a test; without symptoms it is best to wait 7 weeks.
- US Centers for Disease Control and Prevention (CDC)
Getting Tested for HIV (Sept 15, 2026) (opens in a new tab)
Window periods by test type (antibody 23 to 90 days; rapid antigen/antibody 18 to 90; lab antigen/antibody 18 to 45; NAT 10 to 33) and the advice to test again after the window period.
- US Centers for Disease Control and Prevention (CDC)
Preventing HIV with PEP (Dec 2, 2024) (opens in a new tab)
PEP is for emergency situations and must be started within 72 hours after a possible exposure to HIV.
- US Centers for Disease Control and Prevention (CDC)
Getting Tested for STIs (Mar 17, 2026) (opens in a new tab)
People who have had oral or anal sex should talk with their healthcare provider about throat and rectal testing options.
- NHS (UK National Health Service)
Syphilis (reviewed Mar 17, 2026) (opens in a new tab)
It can take 3 weeks or more for the first symptoms of syphilis to appear; a test is the only way to confirm it.
- NHS (UK National Health Service)
Genital herpes (reviewed Jun 27, 2023) (opens in a new tab)
The herpes swab test cannot be done without visible blisters or sores and cannot tell you how long you have had herpes.
- US Centers for Disease Control and Prevention (CDC)
STI Treatment Guidelines, 2021: Screening Recommendations (reviewed Mar 22, 2024) (opens in a new tab)
HSV-2 serologic screening among the general population is not recommended; type-specific testing can be considered for people presenting for an STI evaluation, especially with multiple partners.
- US Centers for Disease Control and Prevention (CDC)
About Genital HPV Infection (Jan 31, 2025) (opens in a new tab)
There is no test to find out a person's HPV status; HPV tests are used to screen for cervical cancer in women aged 30 and older.
