The best approach is not to fight the uneven sidewalk with one oversized bolt. It is to create a stable, level mounting base and then fasten the can to that base with hardware suited to concrete. Start by checking what the can sits on: a poured concrete slab, pavers, or cracked sidewalk. If the surface is badly broken or hollow, repair or replace that section first; otherwise anchors will loosen.
For a permanent public bin, set a galvanized steel or stainless-steel mounting plate over the uneven area. Use adjustable leveling feet or stainless shims to bring the plate level, then grout or mortar under the plate so it has full contact and does not rock. Anchor the plate into the concrete with wedge anchors, sleeve anchors, or epoxy anchors, depending on slab condition. Use stainless or hot-dip galvanized hardware, and add nylon washers to reduce galvanic corrosion. Keep anchors at least 4–6 inches from cracks and edges. If the bin has a base ring, bolt through pre-drilled holes; if it is plastic, use a metal reinforcement plate inside the base so the plastic does not crack.
If drilling is not allowed—common on historic sidewalks or leased spaces—use a weighted portable base instead. Fill a low-profile base with sand or water, or use a steel ballast frame, and add a rubber mat to grip the uneven surface. That will not stop determined vandalism, but it prevents tipping and keeps the bin serviceable.
Do not ignore safety: keep the can out of the pedestrian clear zone, leave ADA clearance, and avoid creating a trip hazard with exposed bolts. Cap bolts or recess them. Check drainage so water does not pool around the base, especially if you grout or shim. In freeze-thaw climates, use anchors rated for exterior concrete and leave a small weep path.
Finally, test it: push the can from several angles and watch for rocking. If it moves, re-shim or add an anchor. A good installation is level, flush, corrosion-resistant, and easy to unbolt for maintenance. That combination—level base, full contact, correct concrete anchors, and rust-proof hardware—is the most reliable way to anchor urban trash cans on uneven sidewalks.