For vegetables in an urban planter box, avoid filling the box with native garden soil or heavy topsoil. In a container, that material compacts quickly, drains poorly, and can become too dense for roots. Instead, use a lightweight, well-draining, fertile soil mix designed for containers or raised beds. A reliable starting recipe by volume is about 60–70% high-quality vegetable container mix or raised-bed mix, 20–30% mature compost, and 10–20% perlite. This gives you moisture retention, air space for roots, and enough nutrients for strong growth without making the planter excessively heavy.
Choose a mix with a pH around 6.0–7.0 for most vegetables. Make sure the compost is fully mature so it will not burn young plants or smell unpleasant in a small urban space. If your planter is shallow or sits on a hot rooftop or balcony, the mix should hold moisture but still drain freely. Check that the box has drainage holes and never let water sit at the bottom. For leafy greens and herbs, this basic mix works very well. For tomatoes, peppers, or other heavy feeders, add a slow-release organic fertilizer or plan to feed regularly during the growing season.
Do not use fresh manure, salty soil, or unknown urban soil in a food-growing planter. Clean, purchased ingredients are safer and more predictable. Fill the box loosely rather than packing the mix down, leave a small watering rim below the top edge, and mulch the surface with straw or fine bark to reduce evaporation. Over time, the mix will settle, so top it up with compost or fresh container mix between crops. With good drainage, balanced organic matter, and regular replenishment, an urban planter box can support healthy vegetables even in a small city space.