File types / Images
.svg file
SVG vector image
- Extensions
- .svg
- MIME type
image/svg+xml- Signature
- None (text format)
- Safety
- Open with care
What is a .svg file?
SVG is a vector image format written as XML text, so it scales to any size without blurring and can be edited in a text editor.
Because it is text there is no fixed binary signature. A typical SVG starts with an XML declaration or an <svg element.
Used for: Logos, icons and diagrams on the web.
How can I tell if a file is really a SVG?
No magic bytes. Look for text beginning with <?xml or <svg. Because there is no fixed signature, the reliable check is to look at the content itself. The File Identity tool reports what it can see without uploading the file.
To compare the name against the content, use Validate Extension. To see the raw bytes, use Safe File Preview.
Is a .svg file safe to open?
SVG can contain scripts and external references. An SVG from an untrusted source opened directly in a browser can run JavaScript, so treat it more like a web page than a picture.
Easy to confuse
An SVG file opened through an <img> tag cannot run scripts, but the same file opened directly can.