Yes, but with a caveat: an urban planter box is not a natural insect repellent by itself. The box, soil, and plants create a small ecosystem, and whether it attracts or deters pests depends on design and planting. You can make a planter box much less attractive to common urban pests by combining the right materials, plants, and maintenance habits.
Start with the container. Cedar and redwood are popular because their natural oils help resist rot and some wood-boring insects, and they hold up well in wet conditions. Avoid untreated wood that softens quickly, and make sure the box has drainage holes and air gaps so water does not collect. Standing water is what attracts mosquitoes, fungus gnats, and other nuisance insects. If you use saucers, empty them after watering.
Plant choice matters. Many aromatic herbs and flowers naturally deter or confuse insects: lavender, rosemary, sage, basil, mint, lemongrass, marigolds, and citronella geraniums are common choices. Mint should stay in its own pot because it spreads aggressively. These plants are not insecticides—they reduce pressure, especially when grouped near seating areas or entryways. Combine them with plants suited to your light and climate so they stay healthy; stressed plants attract pests.
Companion planting and healthy soil do more than scent alone. Mix flowers with herbs and vegetables to bring in beneficial insects such as ladybugs and parasitic wasps. Use mulch to keep soil moisture even and prevent splashing, but leave a little breathing room around stems. Water in the morning, avoid overfertilizing, and remove dead leaves and spent flowers. Check under leaves and along stems regularly so small problems do not become infestations.
In short, no urban planter box is a magical insect shield, but a well-designed one can naturally deter pests. Choose durable cedar or redwood, ensure excellent drainage, plant aromatic herbs and flowers, and keep the box clean and healthy. That combination will not eliminate every insect, but it will make your planter less inviting to the ones you do not want—while still supporting bees, butterflies, and other beneficial visitors.