---
title: removeOffCanvasPaths
svgo:
  pluginId: removeOffCanvasPaths
---

If a [`viewBox`](https://developer.mozilla.org/docs/Web/SVG/Attribute/viewBox) is present,
removes [`<path>`](https://developer.mozilla.org/docs/Web/SVG/Element/path) elements that are drawn outside of it.

Elements with a [`transform`](https://developer.mozilla.org/docs/Web/SVG/Attribute/transform) attribute are ignored, to avoid falsely removing elements that are brought into view through styles or an animation.
