{
  "slug": "svg-optimize",
  "name": "gizza-ai/svg-optimize",
  "version": "0.1.0",
  "title": "SVG Optimizer — minify & clean up SVG markup — gizza.ai",
  "description": "Minify and clean SVG in your browser — collapse whitespace, strip comments, the XML prolog and Inkscape/Sodipodi metadata. Path data is untouched. Nothing uploaded.",
  "tags": [
    "svg optimizer",
    "minify svg",
    "svg minifier",
    "clean svg",
    "svgo",
    "compress svg"
  ],
  "category": "image",
  "urls": {
    "page": "https://gizza.ai/tools/svg-optimize/",
    "markdown": "https://gizza.ai/tools/svg-optimize/index.md",
    "descriptor": "https://gizza.ai/tools/svg-optimize/tool.json",
    "deep_link_example": "https://gizza.ai/tools/svg-optimize/?svg=%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%3E%0A%20%20%3C%21--%20icon%20--%3E%0A%20%20%3Cpath%20d%3D%22M12%202L2%2022h20L12%202z%22%2F%3E%0A%3C%2Fsvg%3E&remove_comments=true&remove_metadata=true&remove_ids=true&remove_dimensions=true"
  },
  "cli": "gizza tool svg-optimize '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n  <!-- icon -->\n  <path d=\"M12 2L2 22h20L12 2z\"/>\n</svg>'",
  "tool": {
    "description": "Optimize SVG markup: collapse whitespace and indentation, remove comments, the <?xml?> declaration and <!DOCTYPE>, strip editor metadata (<metadata>, inkscape:/sodipodi: elements + attributes, unused editor xmlns), and normalize tag whitespace. Conservative by default — path data and numbers are never rewritten, so the rendered image is unchanged. Set remove_comments=false to keep comments; remove_ids=true to also drop id/class; remove_dimensions=true to drop root width/height when a viewBox exists. The verbatim contents of <script>, <style> and <text> are preserved. Runs locally.",
    "parameters": {
      "additionalProperties": false,
      "properties": {
        "remove_comments": {
          "default": true,
          "description": "Remove <!-- … --> comments (default true).",
          "type": "boolean"
        },
        "remove_dimensions": {
          "default": false,
          "description": "Remove width/height from the root <svg> when a viewBox is present so it scales responsively (default false).",
          "type": "boolean"
        },
        "remove_ids": {
          "default": false,
          "description": "Remove id and class attributes from every element (default false — they may be referenced by CSS, JS or <use>).",
          "type": "boolean"
        },
        "remove_metadata": {
          "default": true,
          "description": "Strip editor metadata: <metadata>, inkscape:/sodipodi: elements and attributes, and unused editor xmlns declarations (default true).",
          "type": "boolean"
        },
        "svg": {
          "description": "The SVG markup to optimize.",
          "type": "string"
        }
      },
      "required": [
        "svg"
      ],
      "type": "object"
    }
  }
}