Free SVG sample files

Vector images written as XML. They scale to any size and can contain scripts, so uploads need sanitising. Download valid SVG test files in 4 exact sizes, from 1 KB to 1 MB, each with a checksum.

Extension
.svg
MIME type
image/svg+xml
Kind
Text
Category
Images

SVG files by size

Every file below is a valid Scalable Vector Graphics file of exactly the stated size. Open a file's page for its checksum and contents, and to preview it in your browser before downloading.

SVG sample files by size
FileSizeContentsDownload
1 KB SVG samplesample-svg-1kb.svg 1 KB1,024 bytes Shapes: 10 circles and rectangles Download SVG
10 KB SVG samplesample-svg-10kb.svg 10 KB10,240 bytes Shapes: 135 circles and rectangles Download SVG
100 KB SVG samplesample-svg-100kb.svg 100 KB102,400 bytes Shapes: 1,391 circles and rectangles Download SVG
1 MB SVG samplesample-svg-1mb.svg 1 MB1,048,576 bytes Shapes: 14,284 circles and rectangles Download SVG

What is an SVG file?

SVG describes shapes, paths and text in XML, so images stay sharp at any size and are often smaller than bitmaps. It is the usual format for icons, logos and charts on the web.

An SVG file is a document, not just a picture. It can include scripts, external references and embedded HTML, which browsers will run when the file is opened directly.

How to recognise an SVG file

The first bytes of every file. Often preceded by an XML declaration.
Extension.svg
MIME typeimage/svg+xml
StandardW3C SVG 1.1 and SVG 2
EncodingXML, usually UTF-8
Compressed form.svgz (gzip)
Can containShapes, text, gradients, filters, scripts, external references

What to test for

These are the behaviours that most often go wrong when software handles SVG files.

Strengths of SVG

  • Sharp at any size, from an icon to a billboard.
  • Text-based, so it can be styled with CSS, edited by hand and compressed well.

Limitations of SVG

  • Poor for photographs and very detailed artwork.
  • Can carry scripts, so uploads must be sanitised.

Typical uses of SVG test files

  • Testing SVG sanitisation on upload
  • Checking rasterisation to PNG
  • Testing icon pipelines and optimisers

Software that opens SVG

  • All web browsers
  • Inkscape, Illustrator and Figma
  • SVGO, resvg and librsvg

Specifications

Related

SVG sample files: questions

Do the SVG samples contain scripts?
No. They contain only circles, rectangles and a title element, with no scripts, fonts or external references.
What is the MIME type of an SVG file?
The MIME type is image/svg+xml. The file extension is .svg.
Is a sample SVG file the same as a dummy or example SVG file?
Yes. Sample, test, dummy and example SVG files are different names for the same thing: an SVG file with known contents that stands in for a real one. Any file on this page will do wherever a tutorial or a test plan asks for a dummy SVG file.