STD tests work by detecting either the genetic material of a pathogen, the antibodies your immune system produces in response to it, or the pathogen itself under a microscope. The specific method depends on which infection is being tested. Most screening panels combine a blood draw, a urine sample, and sometimes a swab to cover the most common infections in a single visit.
What Each Sample Type Tests For
Different infections live in different parts of the body, which is why a single sample can’t catch everything. Blood tests are used for HIV, syphilis, hepatitis B, and sometimes herpes. Urine tests screen for chlamydia, gonorrhea, and trichomoniasis. Swab tests collect cells directly from a site of potential infection, including the vagina, cervix, penis, urethra, rectum, or throat, and are used for chlamydia, gonorrhea, herpes, and HPV.
If you have a visible sore, your provider may swab it directly to examine the fluid. For people without symptoms, the standard screening usually involves a blood draw and a urine cup, sometimes paired with a vaginal or urethral swab. If you’ve had oral or anal sex, you may need throat or rectal swabs specifically, since a urine test won’t detect infections at those sites.
How Labs Detect Chlamydia and Gonorrhea
The gold standard for chlamydia and gonorrhea is a technology called nucleic acid amplification testing (NAAT). This technique takes a tiny amount of genetic material from the pathogen and copies it millions of times until there’s enough to detect. Think of it like photocopying a single sentence until you have a whole stack of pages: even if only a small number of bacteria are present in your sample, the test amplifies their DNA until the signal is unmistakable.
This approach is extremely accurate. Sensitivity (the ability to correctly identify an infection) is typically well above 90%, while specificity (the ability to correctly rule one out) sits at 99% or higher. Modern versions of the test can even screen for both chlamydia and gonorrhea from the same sample tube simultaneously, using different genetic markers to distinguish between them. The discovery that NAAT works reliably on urine and self-collected vaginal swabs is what made non-invasive STD screening possible.
How HIV Testing Works
HIV screening uses a different strategy. Rather than looking for the virus’s genetic material, the preferred lab test is an immunoassay that hunts for two things at once: a protein from the virus’s outer shell (called p24 antigen) and the antibodies your immune system builds against HIV-1 and HIV-2. The test turns positive when it finds any one of those three markers.
Detecting the p24 antigen is what makes newer tests faster than older antibody-only versions. The antigen shows up in your blood before your body has time to mount an antibody response, which means a lab-based blood test can pick up an infection as early as two weeks after exposure, with nearly all infections caught by six weeks. Oral rapid tests, which only detect antibodies, take longer to become reliable: about one month for most cases, and up to three months to catch almost all of them.
The Two-Step Process for Syphilis
Syphilis screening is unique because it requires two separate tests to confirm a result. The traditional approach starts with a nontreponemal test like the RPR, which detects antibodies your body produces in reaction to tissue damage caused by the syphilis bacterium. It doesn’t look for the bacterium directly. Instead, it measures your immune response to a fatty substance (cardiolipin) released when cells are damaged. In the RPR test, charcoal particles clump together visibly when those antibodies are present in your blood.
Because other conditions can trigger the same antibody response and cause a false positive, any reactive RPR is followed by a treponemal test like the TPPA. This second test uses antigens specific to the syphilis bacterium itself, bound to tiny gelatin particles. If both tests come back positive, syphilis is confirmed. Some labs now run the tests in reverse order, starting with the treponemal test, but the two-step confirmation remains essential either way.
Why Herpes Testing Is Different
Herpes blood tests look for IgG antibodies specific to HSV-1 or HSV-2. Unlike chlamydia or gonorrhea testing, there’s no reliable way to screen for herpes from urine. If you have an active sore, a swab of the lesion is the most accurate option. Without symptoms, a type-specific IgG blood test is used instead.
Herpes testing has more limitations than screening for other STDs. Your body takes 10 to 21 days to produce detectable antibodies, so testing too early after exposure can produce a false negative. If clinical suspicion is high but results come back negative, retesting 6 to 12 months later is sometimes recommended. IgM testing, which some clinics still offer, is unreliable for herpes because it cross-reacts with other herpes family viruses and shouldn’t be used for diagnosis.
Window Periods by Infection
Every STD has a window period: the gap between exposure and the point when a test can reliably detect it. Testing too early risks a false negative.
- Chlamydia and gonorrhea: Detectable in about one week for most cases. Two weeks catches nearly all infections.
- Syphilis: Blood tests pick up most infections by one month. Three months catches almost all.
- HIV (blood antigen/antibody test): Two weeks catches most. Six weeks catches almost all.
- HIV (oral rapid test): One month catches most. Three months catches almost all.
If you’re testing after a specific exposure, timing matters. Testing at one week for chlamydia is reasonable, but testing for HIV with an oral swab at one week is essentially useless. Your provider can help you plan follow-up testing if your initial screen was done early in a window period.
How Long Results Take
Standard lab-processed blood and urine tests typically return results in one to three days. Swab tests have a wider range, anywhere from one to 14 days depending on the lab and the specific test ordered. Rapid point-of-care tests, available for HIV, chlamydia, and gonorrhea, deliver results in about 30 minutes. A 30-minute rapid test for chlamydia and gonorrhea has been shown to match the accuracy of standard lab testing.
At-Home Test Kits
At-home STD kits work by having you collect your own sample (usually urine, a vaginal swab, or a finger-prick blood spot) and mail it to a partner laboratory for processing. The lab runs the same types of tests used in clinical settings. FDA-approved home kits for chlamydia and gonorrhea achieve 95 to 99% accuracy when samples are collected correctly.
The biggest variable is sample quality. Improper collection, contamination, or temperature fluctuations during shipping can all compromise results. Bacterial infections like chlamydia and gonorrhea test well at home, while viral infections and more complex conditions may be less reliable without professional collection. Recent antibiotic use, the timing of your menstrual cycle, or the presence of other infections can also affect results in ways a home kit’s instructions can’t account for.
Not all kits on the market are FDA-approved, and unregulated options vary widely in quality. If you go the at-home route, check that the service partners with a certified lab and offers clinical support for positive results. Many budget kits leave you to manage treatment and partner notification on your own, which can delay care.