Strip comments and verbose numbers, then export PNG
<svg xmlns="http://www.w3.org/2000/svg" width="120" height="120" viewBox="0 0 120 120"><defs><linearGradient id="g1" x1="0" y1="0" x2="1" y2="1"><stop offset="0" stop-color="#6366f1"/><stop offset="1" stop-color="#22d3ee"/></linearGradient></defs><rect x="10" y="10" width="100" height="100" rx="18" fill="url(#g1)"/><circle cx="60" cy="52" r="17.5" fill="#ffffff" opacity="0.85"/><rect x="42" y="78" width="36" height="7" rx="3.5" fill="#ffffff" opacity="0.65"/></svg>
The optimiser only does safe things: strip comments and metadata, collapse inter-tag whitespace, trim decimals beyond three places, and drop unused version / xlink declarations. Rendering uses a canvas in your browser; nothing is uploaded.