How Does an STD Test Work? Step by Step
Quick answer
A clinician, or a self-collection kit, takes a sample that depends on the infection: urine, a swab or blood. A lab then looks for either genetic material from the germ itself, as NAAT tests for chlamydia and gonorrhea do, or for antibodies your body made against it, as many blood tests do. Timing matters, because most tests can't detect a very recent infection, so a negative soon after exposure may need repeating.
The test you need
- Test
- A lab test on a urine, swab or blood sample, chosen for each infection
- Sample
- Urine, a swab (genital, throat or rectal) or blood from a vein, depending on the infection
- When
- It varies by infection. For HIV the CDC gives 10 to 33 days (NAT) up to 90 days (antibody tests). The NHS says STIs in general can take up to 7 weeks to show on a test.
- Results
- MedlinePlus says chlamydia results are usually ready within a day. The CDC says mail-in kits can take a few days.
An STD test is simpler than most people expect: you give a sample, a lab checks it, and you get a result. What changes from test to test is the kind of sample, what the lab looks for, and how soon after exposure the result can be trusted. Here is the process in order.
How does an STD test work, step by step?
- You decide what to test for. A clinician can help, or you can choose individual tests or a panel online. The CDC encourages an open conversation about your sexual history, because it determines which tests and which body sites make sense.
- A sample is collected. This might be a urine cup, a swab, or blood from a vein in your arm.
- The lab analyzes the sample. It looks for the germ or for your body’s response to it.
- You get a result. This could be through a clinic, a portal or an online account.
- If it’s positive, you get follow-up care, and some results need a second test to confirm.
What samples do STD tests use?
MedlinePlus groups them like this:
- Blood: syphilis, HIV, hepatitis B, and sometimes herpes.
- Urine: trichomoniasis, chlamydia, and sometimes gonorrhea.
- Swabs: HPV, chlamydia, gonorrhea and herpes.
The CDC adds that you may need to provide blood, urine, or swabs from your vagina, throat or rectum. If you had oral or anal sex, it says to ask your provider about throat and rectal testing, because a urine test won’t sample those sites.
What do labs actually look for?
There are two main approaches.
Looking for the germ. NAAT tests, used for chlamydia and gonorrhea, are designed to amplify and detect nucleic acid sequences specific to the organism, according to the CDC. In plain terms, they find the germ’s genetic material, even in tiny amounts. The CDC says NAAT is the only non-culture test recommended for routine use for those two infections. For herpes, a NAAT on a swab of a sore is the most sensitive test.
Looking for your body’s response. Antibody tests look for proteins your immune system makes against a germ. The CDC lists HIV antibody tests, which look for antibodies in blood or oral fluid. Antigen/antibody tests look for both HIV antibodies and antigens, according to the CDC. A nucleic acid test for HIV looks for the virus itself. Herpes blood tests look for type-specific antibodies.
Why does timing matter?
Every test has a window period, a stretch after infection when it can’t yet detect the germ or your body’s response. For HIV, the CDC gives 10 to 33 days for a NAT, 18 to 45 days for a lab antigen/antibody test, and 23 to 90 days for antibody tests. For gonorrhea, MedlinePlus says it may take weeks before you test positive. The NHS says STIs in general can take up to 7 weeks to show on a test.
The cautious approach: if you test early and the result is negative, ask whether to repeat it later. Our window-period calculator can help with dates.
How long do results take?
It depends on the test and who runs it. MedlinePlus says chlamydia results are usually ready within a day, with some rapid tests giving results in 90 minutes or less. The CDC says self-testing devices give results within minutes, while mail-in kits take a few days. STDCheck, an online ordering service, says on its own site that results are posted to your account within 1 to 2 days. That is STDCheck’s claim, and your timing may differ.
What happens if the result is positive?
A positive result often triggers a second step. The CDC says a positive HIV self-test needs follow-up testing to confirm, syphilis requires two different blood tests, and a low-level positive herpes antibody result may need a confirmatory test with a different method. That’s normal, not a sign something went wrong. A clinician will explain your options and prescribe treatment where it applies.
Can I do it all at home?
Partly. The CDC lists self-testing for HIV, syphilis and some other infections, and mail-in kits for HIV, syphilis, chlamydia and gonorrhea. The FDA has authorized at least one chlamydia and gonorrhea test with at-home sample collection. Kits vary in what they cover, so read what a kit tests for, which sample it uses, and how a positive result is followed up before you buy.
Get care now if
- You may have been exposed to HIV in the last 72 hours. Go to urgent care or an emergency room now and ask about PEP.
- You have painful urination, unusual discharge, genital sores, or testicular pain or swelling. See a clinician rather than waiting for a routine test.
- You are pregnant and think you may have an STI
- You have a high fever or severe lower belly pain along with possible STI exposure
Call 911 for a medical emergency. Otherwise, an urgent care clinic, sexual health clinic or your doctor can see you.
When to test
- Today, if you may have been exposed to HIV in the last 72 hoursGo to urgent care or an ER now and ask about PEP. Testing can come after.
- Now, if you have symptoms or a partner has told you they have an STISee a clinician and say what has happened. Don't wait for a routine test window.
- After the window for the infection you are worried aboutGive the sample once enough time has passed for the test to pick up an infection. The window differs for each infection, so check the one you're testing for.
- If you tested early and the result was negativeAsk whether to repeat the test. The CDC says to get tested again after the window period for the test you took.
Common questions
Can one test check for every STD?
No single test covers everything. Different infections need different samples, such as urine for chlamydia, blood for HIV and syphilis, and a swab of a sore for herpes. A panel bundles several tests. The CDC also doesn't recommend routine herpes blood screening for people without symptoms, so a panel may include tests you'd want to talk through with a clinician.
Are at-home STD tests the same as lab tests?
Self-testing devices, which the CDC says give results within minutes, exist for some infections. Mail-in kits are different: you collect a urine, swab or blood sample, send it to a lab and wait a few days. The FDA has authorized at least one chlamydia and gonorrhea test with at-home sample collection, and MedlinePlus advises discussing at-home test results with your provider.
Why does a doctor test urine for some STDs and use a swab for others?
It depends on the germ and where it lives. MedlinePlus lists urine for chlamydia and trichomoniasis, swabs for several infections, and blood for HIV, syphilis and hepatitis B. If oral or anal sex was involved, the CDC says to ask about throat and rectal tests.
What happens if my result is positive?
It depends on the test. The CDC says a positive HIV self-test needs a follow-up test, syphilis needs two different blood tests to confirm, and a low positive herpes blood result may need a second method. A clinician explains the next steps, and treatment, where available, is prescribed by a clinician.
Next: A lab test on a urine, swab or blood sample, chosen for each infection.
Urine, a swab (genital, throat or rectal) or blood from a vein, depending on the infection. It varies by infection. For HIV the CDC gives 10 to 33 days (NAT) up to 90 days (antibody tests). The NHS says STIs in general can take up to 7 weeks to show on a test.
Sources
- MedlinePlus, Sexually Transmitted Infection (STI) Tests
- MedlinePlus, Chlamydia Test
- CDC, Getting Tested for STIs
- CDC, Recommendations for the Laboratory-Based Detection of Chlamydia trachomatis and Neisseria gonorrhoeae, 2014
- CDC, About HIV Test Types
- CDC, STI Treatment Guidelines: Genital Herpes
- CDC, STI Treatment Guidelines: Syphilis
- CDC, STI Treatment Guidelines: Screening Recommendations
- NHS, Sexually transmitted infections (STIs)
- FDA, First test for chlamydia and gonorrhea with at-home sample collection
- CDC, PEP (post-exposure prophylaxis)
This guide is general information written by a patient advocate using public health sources. It is not a diagnosis. Only a clinician or a lab test can tell you whether you have an infection. Read how we write and check our guides.