{"success":true,"data":{"ext":"svg","name":"SVG","description":"Scalable Vector Graphics (SVG) is an XML-based vector image format defined and maintained by the World Wide Web Consortium (W3C). It is used for icons, illustrations, diagrams, charts, and other graphics that must scale cleanly across screen sizes and resolutions, and it is widely supported in browsers and graphics software. SVG files can contain scripts, links, and embedded resources, so files from untrusted sources should be handled with appropriate caution.","mime":["image/svg+xml"],"risk_level":"Safe","signatures":[{"hex":"3C 73 76 67","offset":0,"sources":[{"name":"Apache Tika","url":"https://raw.githubusercontent.com/apache/tika/main/tika-core/src/main/resources/org/apache/tika/mime/tika-mimetypes.xml"}]}],"related":["svgz","cgm","dwg","emf","wmf","ai"],"usage":{"python":"def is_svg(file_path: str) -> bool:\n    \"\"\"Check if file is a valid SVG by magic bytes.\"\"\"\n    signature = bytes([0x3C, 0x73, 0x76, 0x67])\n    with open(file_path, \"rb\") as f:\n        return f.read(4) == signature","node":"function isSVG(buffer: Buffer): boolean {\n  const signature = Buffer.from([0x3C, 0x73, 0x76, 0x67]);\n  return buffer.subarray(0, 4).equals(signature);\n}","go":"func IsSVG(data []byte) bool {\n    signature := []byte{0x3C, 0x73, 0x76, 0x67}\n    if len(data) < 4 {\n        return false\n    }\n    return bytes.Equal(data[:4], signature)\n}"},"category":"Images"}}