I received this question the other day:
I just bought sand for a sandbox that I bought new 3 weeks ago. My granddaughter and I were playing in it and I came across some 2 inch long worms. I had a cover on my sandbox from day one so no animals got into it. I would like to know how to treat the sand without infecting my grandchildren and are these worms harmless.
We often use the term "worm" loosely when referring to different types of parasites. An important point, however, is not all worms are parasites, and not all parasites are worms. Most worms that you find outside are just worms that have no relevance at all to human or animal health.
When it comes to concerns about "worms" and sandboxes, we’re worried about roundworm eggs and hookworm larvae from the feces of infected animals. It’s these microscopic eggs and larvae that are the problem, not any large worms you’d be able to see with the naked eye. Covering sandboxes is recommended to keep animals from defecating in them and contaminating the sand, but various types of non-parasitic worms can still certainly find their way into some outdoor sandboxes, even if they’re covered. I don’t know of any human or animal health concerns regarding these kinds of non-parasitic worms. (I don’t recommend snacking on worms from the sandbox to prove the point, but I would not be concerned about having worms in a sandbox).
More information about sandboxes can be found on the Worms & Germs Resources page.