.svg — Scalable Vector Graphics
Image image/svg+xml
What a .svg file is
An XML description of shapes rather than a grid of pixels, so it stays perfectly sharp at any size and usually weighs very little.
How to open it
Any browser, plus Illustrator, Inkscape and Figma. It is plain text — you can open it in a code editor.
Worth knowing
Because SVG can contain scripts, never render an uploaded SVG from an untrusted source without sanitising it.
How to identify a .svg file
A file's extension is only its name — renaming a.png to a.svg changes nothing inside. What software actually reads is the magic number, the first few bytes of the file.
| Signature | 3C 3F 78 6D 6C or 3C 73 76 67 |
| MIME type | image/svg+xml |
| Category | Image |
Plain text — starts with <?xml or <svg. No binary signature.
# what is this file really?
file mystery.svg
# look at the first bytes yourself
xxd mystery.svg | head -2
head -c 16 mystery.svg | xxd
# Windows PowerShell
Get-Content mystery.svg -AsByteStream -TotalCount 16 | Format-Hex
Converting it
You can convert SVG in your browser without uploading it anywhere: SVG to PNG, SVG to JPG, SVG to WebP.
Frequently asked questions
What is a .svg file?
An XML description of shapes rather than a grid of pixels, so it stays perfectly sharp at any size and usually weighs very little.
How do I open a .svg file?
Any browser, plus Illustrator, Inkscape and Figma. It is plain text — you can open it in a code editor.
Is .svg safe to open?
Usually, but with one caveat: SVG is XML that can contain JavaScript, so an SVG from an untrusted source should be sanitised before being rendered on a web page. Opening one in an image viewer is fine.
Can I change a file's extension to convert it?
No. Renaming changes the label, not the bytes. The one place it appears to work is between formats that genuinely share a container — renaming .docx to .zip works because a DOCX is a ZIP. Everything else needs a real converter.
Other image formats
- .heic — High Efficiency Image Container
- .webp — WebP Image
- .avif — AV1 Image File Format
- .psd — Photoshop Document
- .ai — Adobe Illustrator Artwork
- .raw — Camera Raw Image