Yes. In most cases, you can line an urban planter box with a permeable material to keep soil from leaking out the sides. The best choice is usually a non-woven geotextile or landscape fabric. These materials hold fine soil particles in place while letting excess water pass through, so your plants do not sit in a swamp.
Start by checking where the leak is coming from. If soil is escaping through side gaps, slats, or seams, line the interior walls with landscape fabric, geotextile, coco coir liner, or fine mesh. Cut the liner a few inches taller than the soil line, press it against the sides, and overlap the corners. Secure it with galvanized staples, outdoor adhesive, or clips. At the bottom, cover drainage holes with the same fabric or a piece of window screen. This keeps soil in but allows water out.
Do not use solid plastic sheeting along the sides as a simple fix. It will stop soil, but it can also stop air and water movement, leading to root rot, mold, and poor drainage. If you need waterproofing for a wooden or metal planter, use a waterproof membrane only on the walls and make sure the bottom has proper drainage holes and an air gap. For a self-watering planter, plastic can be part of the design, but it must have an overflow and a separate reservoir.
Good materials include non-woven geotextile, heavy-duty landscape fabric, coco coir liner, burlap, window screen, and hardware cloth. Non-woven geotextile is the best all-around choice because it is durable and permeable. Coco coir is great for side gaps and breathability, but it may decompose over time. Burlap is cheap and natural, but short-lived. Window screen or hardware cloth is useful for large holes, but pair it with fabric to stop fine soil. Weed barrier can work if it is thick and non-woven, but avoid thin plastic types that clog or tear.
Installation is simple. Measure the inside of the planter, cut the liner with extra overlap, line the sides and bottom, and overlap the corners. Secure the top edge so it does not slump, and leave drainage holes clear. Use a chunky potting mix rather than garden soil to reduce compaction. Replace organic liners every year or two.
If the side gaps are very wide, line with coco coir or hardware cloth first, then add landscape fabric behind it. If the planter is small and ornamental, a simple fabric liner is enough. If it is large and exposed to heavy rain, double-check drainage and consider a perforated drainage pipe or gravel layer.
In short, yes: line your urban planter box with landscape fabric, geotextile, or coco coir to stop soil leaking from the sides. Just keep the liner permeable and the drainage path open. That way you keep soil where it belongs and your plants healthy.