SVGOMG SVGO plugins

Remove hidden elements (removeHiddenElems)

Removes elements with display:none or zero opacity that editors leave behind.

What Remove hidden elements does in SVGO

SVGO applies removeHiddenElems as part of its plugin pipeline. In SVGOMG the toggle is labeled Remove hidden elements (enabled by default). Optimization runs entirely in your browser — files are not uploaded to a server.

Use the SVGOMG optimizer with Show original to compare before and after. If output looks wrong, disable this plugin first, then re-enable related transforms one at a time.

When to enable

Exports from Figma, Sketch, and Illustrator with hidden layers.

When to disable

If hidden layers are toggled visible by external CSS in your app.

Watch out for

May remove layers you intended to toggle via CSS in rare setups.

Try it in SVGOMG

  1. Open svgomg.net and load your SVG (file, paste, or demo).
  2. Find Remove hidden elements in the Features panel (removeHiddenElems).
  3. Toggle the plugin and compare the preview; download when satisfied.

Open SVGOMG

SVGO Plugin Guide

Browse the SVGO Plugin Guide or read the full SVG optimization walkthrough on the homepage.