Remove doctype (removeDoctype)
Removes the <!DOCTYPE svg> declaration. Browsers do not need it for inline SVG and it only adds bytes.
What Remove doctype does in SVGO
SVGO applies removeDoctype as part of its plugin pipeline. On SVGOMG.net the toggle is labeled Remove doctype (enabled by default). Optimization runs entirely in your browser — files are not uploaded to a server.
Use SVGOMG.net 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
Production web assets and icons where the doctype provides no behavior.
When to disable
Workflows that require a full XML document with doctype for validation.
Try it
- Open SVGOMG.net and load your SVG (file, paste, or demo).
- Find Remove doctype in the Features panel (
removeDoctype). - Toggle the plugin and compare the preview; download when satisfied.
Part of: Remove metadata and editor noise
This plugin is covered in the Remove metadata and editor noise topic guide along with related transforms.
SVGO Plugin Guide
Browse the SVGO Plugin Guide or read the full SVG optimization walkthrough.