If you have a garden, your goal is likely to grow fresh, healthy produce — farm-to-table style — to nourish yourself and your family. But if you live in an urban area, beware: Your soil could be contaminated with toxic chemicals or metals, which could make their way into your food.

Lead paint, cadmium, arsenic and poly-aromatic hydrocarbons are of greatest concern, according to the University of Minnesota. And neighborhoods near industrial or commercial zones may be exposed to such materials as copper, zinc, chromium, mercury, petroleum, dioxins, benzene, toluene, chlordane, tetrachloroethene and cyanide, according to the Environmental Protection Agency (EPA).

But you can avoid turning your plate of leafy greens into a feast of lead and arsenic. Here are four ways to keep your produce safe and clean up tainted soil.

Related: Buzz Off! 7 Ways to Avoid a Bee or Wasp Sting

Get to know your land

To find out what might reside in your soil, learn as much as you can about the history of your property and community. Ask your state or local environmental agency for guidance on performing a “Phase 1” assessment, in which a trained expert investigates the history, conducts interviews and visually inspects your property, the EPA says.

If the expert believes your site might be contaminated, he can perform a “Phase 2” assessment, which includes conducting soil tests, usually for a fee.

“In a neighborhood such as mine, where the plots are fairly small, you could consider taking a sample from each yard and submitting them together, as soil tests usually require several samples,” says Melissa Hoskins, who lives and gardens in the East Bayside neighborhood of Portland, Maine, which has a long history of contaminated soil.

Improve your soil

You don’t need to dig up your backyard and replace it with new soil. These tips from the EPA and the University of Minnesota offer more practical solutions for reducing garden contamination:

  • Add a thick layer of mulch or other organic matter. It controls dust, keeps dirt away from the kids and might reduce your crop's exposure to contaminants. It also adds nutrients, which contaminated soil may lack.
  • Plant cover crops, which have a similar effect as mulch. Hoskins keeps a bed of clover, for instance. “I have cultivated ground cover crops that require low maintenance and whenever possible support local pollinators,” she says.
  • Build a raised bed on the ground and fill it with new, uncontaminated soil. “I have also put in several raised beds to accommodate leafy greens and root veggies,” says Hoskins.
  • Start a container garden. By growing plants in pots and boxes filled with uncontaminated soil, you also have the option of keeping your garden on the patio or indoors.
  • Try phytotechnology, defined by the International Phytotechnology Society as “the use of plants to remedy environmental problems.” For instance, you can plant non-food crops that gradually cleanse the soil by absorbing the contaminants, although it can take years to show results.

Protect yourself from contaminated soil

When gardening, be careful not to ingest the soil, such as by putting dirty fingers in your mouth (which kids often do) or inhaling dust. “I try to make sure conditions are damp, early in the day or after rain to reduce dust” before doing any work, says Hoskins.

  • Wear gloves, masks and protective clothing as needed, then wash your hands when finished, the EPA advises.
  • Clean gloves and tools before bringing them indoors. The EPA suggests bagging dirty clothes and washing them separately from regular laundry.
  • Watch the kids to make sure they stay clean. “I am much more careful with my one and half year old son,” says Hoskins, who lets him play on raised beds before planting, or in areas with established ground cover. 

Do what you can to eat less of produce that may be contaminated.

  • Wash your harvest, throwing away outer or bottom leaves that may have come into contact with soil, advises the EPA.
  • Try to grow crops that are less likely to absorb contaminants, such as tomatoes, squash, berries and fruit trees. Avoid root crops, such as carrots, onions and potatoes, since they grow directly in the soil.
  • If you do grow root crops, peel them — and any vegetable that may have come into contact with the soil — outside before bringing them into the kitchen.

Related: Can Houseplants Really Clean the Air?

Work with your community

Federal or state funds may be available to help the neighborhood as a whole. The EPA recently issued a $200,000 grant to help East Bayside identify and repair soil contamination caused by decades of lead paint use, tannery and railroad chemical waste and general refuse dumping.

Past remediation projects have been good for East Bayside, “which now offers opportunities for residents to grow veggies right in the ground, along with nearby fruit trees and berry bushes,” says Hoskins, who is also a spokesperson for the East Bayside Neighborhood Organization.

Despite the challenges, she finds gardening to be emotionally and spiritually rewarding. “This is a tiny patch of the wonderful earth we all share,” she says. “It is my endeavor to leave it better than I found it through ongoing education, discussion and hard but fun work.”

Related: Clearing the Air: 3 Dangerous Pollutants in Your Home

David Arv Bragi is a freelance journalist and marketing consultant. He has been writing about health and safety issues since the 1990s and currently lives in Portland, Oregon.