The most reliable way to protect an urban planter box from squirrels and birds is to make the soil surface less inviting and physically block access. Start with a layer of coarse mulch, such as river rocks, gravel, or large bark chips, instead of fine compost or loose potting soil. Squirrels like soft, open soil for burying nuts, and birds often scratch for seeds or insects, so a rough surface can discourage both.
For stronger protection, lay a sheet of 1/2-inch hardware cloth just above or slightly below the soil surface. Cut small X-shaped slits where your plants are growing, and secure the edges with landscape staples or clips. This lets plants grow while stopping digging. If you are starting seeds, cover the planter with a lightweight row cover or fine mesh until the seedlings are established. Make sure the cover is tight and anchored so birds cannot get trapped or push underneath.
A low hoop frame covered with bird netting works well for birds, but use it carefully and check it often so wildlife does not become tangled. For squirrels, mesh needs to be secure because they are strong and persistent. You can also build a simple removable cage from wood or metal stakes and hardware cloth that sits over the planter. Keep the edges weighted or clipped down.
Plant densely where possible and use ground-cover plants to reduce bare soil. Clean up fallen seeds and avoid leaving food scraps or open seed bags nearby. Reflective tape, motion-activated sprinklers, or scent repellents may help for a short time, but they usually need reapplication and are less dependable than a physical barrier. Avoid poisons and sticky traps, especially in urban gardens where pets, children, and wildlife share the space. With a combination of coarse mulch, secure mesh, and careful planting, your planter box can stay attractive and much less vulnerable to digging.