Courts do not drug test everyone who walks through the door. A judge has to order it, and that order usually follows from the nature of the charges, a documented substance abuse history, or an allegation raised in a family law case. So the honest answer to whether they drug test you at court is: sometimes, and predictably. If your case involves drugs or alcohol, if you are on pretrial release, probation, or supervised release, or if custody of a child is in play, expect testing to be on the table. In federal criminal cases, drug testing is actually mandatory for anyone placed on probation or supervised release, with at least one test required within 15 days and periodic testing after that.1Office of the Law Revision Counsel. 18 U.S.C. 3583 – Inclusion of a Term of Supervised Release After Imprisonment
When a Judge Will Order Testing
Judges order drug tests when there is a reason tied to the case. The common triggers are straightforward. Drug and alcohol charges almost always bring testing at some stage. A DUI defendant awaiting trial has an obvious reason to be monitored for sobriety. A defendant with a prior record involving substances is likely to face testing as a condition of release. In family court, a judge can order testing of a parent when the other parent raises credible concerns about substance use around a child.
What courts generally do not do is test walk-ins for unrelated matters. If you are appearing on a traffic ticket, a small claims case, or as a witness, testing is not part of the process. The order attaches to your role in a case that gives the court a reason to require it.
Testing in Criminal Cases
Pretrial Release
When a judge releases you before trial rather than holding you in jail, the release usually comes with conditions. Federal law prohibits any use of controlled substances without a valid prescription as a condition of release, and the judge can also restrict alcohol use.2Office of the Law Revision Counsel. 18 U.S.C. 3142 – Release or Detention of a Defendant Pending Trial Enforcement runs through periodic urinalysis at intervals set by the court or pretrial services. Some defendants are tested at their first appearance or within days of release. Federal pretrial services officers may also show up unannounced at your home.
Failing a pretrial test is serious. The judge can revoke your release and detain you until trial. The reasoning is direct: if you agreed to stay clean as a condition of freedom and did not, the court has grounds to question whether you will comply with the rest of the release conditions.
Probation
Federal probation carries a mandatory drug testing requirement: at least one test within 15 days of the start of probation and at least two more periodic tests, unless the presentence report indicates a low risk of future substance abuse.3U.S. Courts. Chapter 3 – Substance Abuse Treatment, Testing, and Abstinence Most people on probation for drug or alcohol-related offenses face testing more often than that minimum, often random and unannounced.
State probation rules vary but follow a similar structure: regular testing, random callbacks, and escalating consequences for positive results. Probation officers commonly use automated phone systems that require you to call in daily to find out whether you have been selected. If you are selected, you typically need to report to the testing site within hours.
Supervised Release
Supervised release after a federal prison term carries the same mandatory testing regime as probation, but with a hard rule attached to positive results. If you refuse a drug test, or if you test positive for illegal controlled substances more than three times in a single year, the court must revoke your supervised release and send you back to prison.1Office of the Law Revision Counsel. 18 U.S.C. 3583 – Inclusion of a Term of Supervised Release After Imprisonment The word “must” matters. The judge has no discretion to let it slide.
Testing in Family Court
Family courts approach drug testing differently. The concern is the child’s welfare, not punishment, but the consequences of a positive result can be just as life-altering.
Either parent can ask the court to order drug testing of the other during a custody dispute. Judges evaluate these requests under the best interest of the child standard, which gives them broad discretion. You do not necessarily need hard proof of drug use to obtain the order. A clear explanation of why you suspect the other parent is using, and how that use could endanger the child, is often enough, especially if you can point to specific behaviors, incidents, or patterns.
A positive result can dramatically shift a custody arrangement. A judge may reduce unsupervised visitation to supervised visits, require the parent to complete a treatment program before regaining time with the child, or in severe cases transfer primary custody entirely. Courts also commonly order ongoing testing to make sure the parent stays clean.
Drug testing can also come into play in protective order cases where substance abuse is alleged as a contributing factor to domestic violence, and at compliance hearings that check whether a person is following the conditions of an existing order.
Prescriptions and Marijuana
A valid prescription does not automatically protect you from consequences when the drug shows up on a court-ordered test. In federal probation and supervised release, the standard condition is that you may not use any controlled substance “without a prescription by a licensed medical practitioner.”3U.S. Courts. Chapter 3 – Substance Abuse Treatment, Testing, and Abstinence If you have a legitimate prescription, you are expected to disclose it to your probation officer and follow the prescription’s instructions. In regulated workplace testing, a Medical Review Officer verifies the prescription’s authenticity and can reclassify a positive result as negative when the explanation checks out.4eCFR. Subpart G – Medical Review Officers and the Verification Process Court-ordered testing does not always include that layer of review, so telling your probation officer or attorney about any prescriptions before you test is essential.
Marijuana creates its own trap. Even in states where recreational or medical marijuana is fully legal, using it while on federal probation or supervised release violates your conditions. Marijuana remains a controlled substance under federal law, and federal courts enforce that classification regardless of state law. State courts vary: some honor medical marijuana cards, others treat any marijuana use as a violation of sobriety conditions. If you are on any form of court supervision, assume marijuana will be tested for and treated as a violation unless your attorney has confirmed otherwise with the court.
What Happens If You Fail or Refuse
The consequences depend on where you are in the process, but none are minor.
- On pretrial release, a positive test gives the judge grounds to revoke bail. The judge may instead impose stricter conditions, like electronic monitoring or mandatory treatment.
- On probation, a failed test can trigger anything from increased testing frequency and mandatory treatment to full revocation and imposition of the original jail or prison sentence.
- On federal supervised release, revocation is mandatory if you refuse a test or test positive more than three times in a year. A single positive can also lead to revocation at the court’s discretion.1Office of the Law Revision Counsel. 18 U.S.C. 3583 – Inclusion of a Term of Supervised Release After Imprisonment
- In custody cases, a positive result can reduce your time with your child to supervised visits, force you into treatment before regaining time, or move primary custody to the other parent.
- In drug court, a first positive often draws a graduated sanction like community service or a brief jail stay rather than expulsion. Repeated failures are treated differently.
Refusing a test is generally treated worse than failing one. In criminal cases, refusal can constitute contempt of court. On federal supervised release, refusal triggers mandatory revocation, the same consequence as three positive tests. In family law cases, judges typically draw a negative inference and treat the refusal as if the result would have been positive, which can be devastating in a custody fight. Tampering with a sample carries its own penalties on top of whatever the underlying positive would have brought.
Challenging a Positive Result
A positive result on an initial screening is not the final word. Most court-ordered testing begins with an immunoassay screening, which is fast but prone to cross-reactivity with legal substances. Common medications like bupropion, venlafaxine, certain antihistamines, ibuprofen, and cough suppressants containing dextromethorphan have all been documented to trigger false positives. If you contest a positive result, federal law requires confirmation using gas chromatography-mass spectrometry (GC-MS) or an equivalently accurate method before the court imposes consequences.5U.S. Courts. How Substance Use Testing and Treatment Work
Chain of custody is another avenue. Every sample must be handled, labeled, stored, and transported according to strict protocols. If the testing facility cannot document an unbroken chain from collection to analysis, your attorney can argue the results are unreliable and should be excluded. Samples must typically be stored in a secure freezer for at least 30 days to allow time for confirmation testing.6Office of Justice Programs. Drug Testing Procedures Manual
You can also challenge the court’s authority to order the test at all, on the ground that it is an unreasonable search under the Fourth Amendment.7Justia. Drug Testing – Fourth Amendment, Search and Seizure, U.S. Constitution Annotated These challenges rarely succeed when you are already on probation, supervised release, or in a custody dispute where a child’s safety is at stake. They are more viable when the court orders testing with no apparent connection to the charges or the issues in the case.
Who Pays for the Testing
The person being tested usually pays. Standard urine tests typically cost $25 to $80 per test. Hair follicle tests are more expensive, generally $100 to $150. Continuous alcohol monitoring devices carry monthly fees. For someone testing multiple times per month over months or years of supervision, the cumulative cost becomes a real financial burden.
Some courts will waive testing fees for defendants who can demonstrate they are indigent, but this is discretionary. A few states cover testing costs for certain defendants as part of the criminal proceedings, particularly when the test supports a sentencing decision rather than ongoing monitoring. If cost is a concern, raise it with your attorney early. The court may not volunteer alternatives, but some judges will consider reduced testing schedules or fee waivers when the financial hardship is documented.