Pressure treated lumber has been treated with pesticides and other chemicals to prevent fungi and insects from damaging wood and to prevent rot. The chemicals in the wood can leach into soil and in turn, be taken up by plants. Root crops like carrots and potatoes take up more chemicals than leafy vegetables. Pressure-treated lumber is not recommended for raised beds for growing vegetables.
Never use railway ties treated with creosote. This wood is dark in colour and smells like petroleum. The chemicals used to treat this wood are extremely toxic.
If you want to use recycled wood, it’s hard to tell if it has been treated with preservatives. Pressure-treated lumber has no smell and the colour is not different from untreated wood. It’s best to use recycled wood for containers for growing flowers – not vegetables.
The safest wood to use for vegetable container gardens is cedar. It resists rot and lasts a long time, but it is pricey. You can safely use other kinds of untreated hardwood to build raised beds, but your project will rot and warp in a few years, depending on the wood.
Plastic lumber is durable lumber that looks a lot like wood. The plastics and composites used to make the product vary by manufacturer. They may or may not be food safe.