How Do They Test for STDs? Blood, Urine & Swabs

STD testing typically involves giving a urine sample, having blood drawn, or providing a swab from the genitals, throat, or rectum, depending on which infections are being checked. There’s no single test that screens for everything at once. Each STD has its own test, and the type of sample needed varies.

What Samples You’ll Need to Provide

Most STD testing breaks down into three categories: urine, blood, and swabs. A urine test is one of the most common and easiest. You pee into a cup, and the sample gets sent to a lab. This is the standard method for detecting chlamydia and gonorrhea in many cases.

Blood draws are used for HIV, syphilis, and hepatitis B and C. A technician draws blood from your arm, or in some rapid-test settings, you get a simple finger prick. Swabs are used when the infection may be at a specific body site. A provider (or you, in many clinics) swabs the vagina, throat, or rectum. For herpes, a swab taken directly from an open sore is the most reliable method.

You won’t necessarily need all three types. What you’re asked to provide depends on your sexual history, symptoms, and which STDs your provider is screening for. If you’re getting a routine panel with no symptoms, expect a urine sample and a blood draw at minimum.

Chlamydia and Gonorrhea Testing

These two infections are almost always tested together using the same sample, either urine or a swab. The lab runs what’s called a nucleic acid amplification test, which works by detecting tiny fragments of the bacteria’s genetic material and copying them millions of times until they’re measurable. This technology is extremely sensitive. It can theoretically detect a single copy of bacterial DNA, and in practice, sensitivity runs above 90% with specificity at 99% or higher. That means false positives are rare, and the test catches the vast majority of infections.

For people with vaginas, a vaginal swab (often self-collected) tends to be the most accurate sample type. For people with penises, a urine sample works well. If you’ve had oral or anal sex, your provider may also swab your throat or rectum, since infections at those sites won’t show up in a urine test.

HIV Testing

Modern HIV testing uses a combination approach that looks for two things simultaneously: a protein the virus produces early in infection and the antibodies your immune system builds in response. This dual detection is what makes current tests so effective. The viral protein appears in the blood within about two weeks of infection, often before antibodies develop, so the combination test catches infections earlier than older methods that relied on antibodies alone.

A large real-world evaluation found this type of test had 100% sensitivity and 99.84% specificity, correctly identifying every positive case while producing almost no false positives. It accurately detected samples that were positive for only the viral protein (very early infection), only antibodies (established infection), or both.

Rapid HIV tests, including oral swab versions, are also available but have a longer window period. A blood-based test catches most infections by 2 weeks and nearly all by 6 weeks. An oral swab test catches most by 1 month but needs up to 3 months to be fully reliable.

Syphilis Testing

Syphilis requires a blood test, and the process is a bit more involved than other STDs because it uses two different tests together. The first is a screening test that detects a general immune response to the infection. If that comes back positive, a second, more specific test confirms whether the antibodies are actually targeting the syphilis bacterium. Both tests are needed because the screening test alone can sometimes react to things other than syphilis, and the confirmatory test helps distinguish between an active infection and one that was treated in the past.

Syphilis has one of the longer window periods. Testing catches most infections about 1 month after exposure, but it can take up to 3 months to detect nearly all cases.

Hepatitis B and C

Both are detected through blood tests that look for a combination of markers. For hepatitis B, a standard panel checks three things: a protein on the surface of the virus (indicating active infection), antibodies your body makes to fight the virus (which also appear after vaccination), and a third antibody that only develops from actual infection, not vaccination. Together, these markers tell your provider whether you have a current infection, had one in the past, or are protected through vaccination.

Hepatitis C testing works similarly, starting with an antibody test. If antibodies are found, a follow-up test checks for the virus itself to determine whether the infection is active or was cleared on its own.

Herpes Testing

Herpes is one of the trickier STDs to test for. The most reliable method is a swab taken directly from an active blister or sore that hasn’t started crusting over. If you have visible sores, this is the test to ask for.

When no sores are present, a blood test can check for herpes antibodies, but these tests have significant limitations. The chance of a false positive is much higher than with chlamydia or gonorrhea testing because current herpes blood tests are less precise. A false positive is especially likely in people who have a low risk of infection. It can also take up to 16 weeks or more after exposure for antibodies to become detectable.

Because of these limitations, the CDC does not recommend routine herpes blood testing for people without symptoms in most situations. If you’re concerned about herpes, testing is most useful when you have an active outbreak.

HPV Testing

HPV testing is currently only available as a cervical screening tool. The approved tests work with cervical samples and are not cleared for use on oral or anal specimens. This means there is no standard HPV test for men. There’s also no recommended routine screening for anal HPV, even in higher-risk groups, because HPV infection rates are so high in those populations that a positive result doesn’t meaningfully guide next steps.

For women, HPV testing is part of routine cervical cancer screening (often combined with or replacing the Pap smear) and focuses on detecting the high-risk HPV strains that can lead to cancer. For men, HPV-related health issues are typically identified through visual examination or biopsy if abnormal tissue is found.

Window Periods by Infection

Testing too soon after exposure can produce a false negative. Each infection has a “window period,” the minimum time needed for the test to reliably detect it:

  • Chlamydia and gonorrhea: 1 week catches most cases, 2 weeks catches nearly all
  • HIV (blood test): 2 weeks catches most, 6 weeks catches nearly all
  • HIV (oral swab): 1 month catches most, 3 months catches nearly all
  • Syphilis: 1 month catches most, 3 months catches nearly all
  • Herpes (blood test): Up to 16 weeks or more

If you test negative but the exposure was recent, retesting after the full window period gives you a definitive answer.

At-Home Test Kits

At-home STD testing has become increasingly accessible. There are two main types: self-test kits that give you results in minutes (similar to a home pregnancy test) and self-collection kits where you gather your own samples and mail them to a lab.

Self-collection kits have you provide a vaginal swab, urine sample, or finger-prick blood sample at home. The samples go to the same types of laboratories that process clinic samples. Evidence supports their reliability. A 2024 meta-analysis of 19 studies found that at-home self-collection for chlamydia and gonorrhea identified positive results at comparable or higher rates than clinic-based testing. A pilot program in Texas found that at-home kits detected infections at nearly double the rate of clinic testing, likely because they reached people who otherwise wouldn’t have come in for screening.

At-home kits are a solid option if you want privacy, don’t have symptoms, or face barriers to visiting a clinic. If you do have symptoms, especially sores, unusual discharge, or pain, an in-person visit allows for a physical exam and direct swab testing that at-home kits can’t replicate.