ImageText-based

image/svg+xml

SVG

Reference for image/svg+xml, the scalable vector graphics format for resolution-independent images on the web.

MIME Type Detector

Drop a file to detect its MIME type — no upload, runs in your browser

📄

Drop any file here or click to choose

Expected extensions: .svg, .svgz

HTTP Content-Type Header

HTTP Header
Content-Type: image/svg+xml; charset=utf-8

Associated File Extensions

.svg.svgz

Quick Facts

MIME Typeimage/svg+xml
CategoryImage
TypeText-based (human-readable)
Extensions.svg, .svgz

Common Usage

SVG is an XML-based vector image format that scales to any size without quality loss. It is used for logos, icons, illustrations, data visualizations, maps, and interactive graphics on the web.

SVGs can be styled with CSS and manipulated with JavaScript.

Code Examples

HTML
<!-- Link or embed with explicit type -->
<link rel="stylesheet" href="file.svg" type="image/svg+xml">

<!-- Or for script/media elements -->
<script type="image/svg+xml" src="file.svg"></script>
Node.js
// Express.js
app.get('/file', (req, res) => {
  res.type('image/svg+xml');
  res.send(data);
});

// Node.js http
res.writeHead(200, { 'Content-Type': 'image/svg+xml' });
nginx
# nginx.conf — add to types block or use default
types {
    image/svg+xml  svg svgz;
}

# Or set for a specific location
location /api/ {
    default_type image/svg+xml;
}

Related MIME Types

More Image MIME Types

Other image types in the Image family

Related Tools

Explore More MIME Types

Browse our complete reference of 185 MIME types with usage examples, HTTP headers, and code snippets.