How to fix an SVG icon cropped by its viewBox
Answer in brief
Compare the drawing coordinates with the viewBox rectangle, including the stroke at each edge. Expand the coordinate window or move the path inward when important pixels are outside it.
Recover a clipped circle
A circle at (12,12) with radius 12 fills a 0 0 24 24 box before its stroke is added. A two-unit stroke extends one more unit outward. Try radius 11 to keep its outer edge inside the original box.
Inspect filter clipping separately
If the outline is complete but the shadow ends abruptly, temporarily disable the SVG filter. A clean path with a clipped shadow points to the filter's effect region. Check that region as well as the outer viewBox before adding padding around every icon in the collection.
Sources
- [1] viewBox - SVG — MDN Web Docs, accessed November 23, 2026
Frequently asked questions
Does enlarging CSS width fix cropped geometry?
CSS width scales the viewport. Adjust the SVG coordinates or viewBox when the missing region lies outside the drawing window.