Free PNG test files and sample generator
Lossless raster image format with transparency support. Great for screenshots and UI test assets.
What is a .png file?
PNG: Portable Network Graphics. PNG is the standard lossless image format for screenshots, logos and any graphic with sharp edges or transparency. It is compressed, so file size and pixel dimensions are only loosely related, which matters when testing size limits.
Why generate a test PNG file?
- Test image upload, resizing and thumbnail generation.
- Check dimension and file-size validation independently of each other.
- Verify a corrupted image is rejected before it reaches a processing library.
What you can put inside a .png file
You get 4 content options for PNG, so the file holds something meaningful rather than random padding: Image, Bar chart, Pie chart, QR code. Pick several and they are merged into one file, with a section, sheet, slide or folder for each.
How a .png file is identified
Every .png file begins with 89 50 4E 47 0D 0A 1A 0A, deliberately awkward: the high bit catches 7-bit transfers, and the CR-LF pair catches software that "helpfully" converts line endings. That is what a validator inspecting content rather than the file name looks for.
How the size lands on the exact byte
PNG is a sequence of typed chunks and decoders must skip ones they do not recognize, so the padding is a private ancillary chunk placed before IEND. The pixels are unchanged.
Negative testing with broken PNG files
- Invalid. Identifiable, but wrong inside, so it fails during parsing.
- Corrupted. The leading bytes are destroyed, so the
89 50 4E 47 0D 0A 1A 0Aidentifying a .png is gone. Same length as the valid file. - Incomplete. Truncated part-way, so it is genuinely shorter.
- Empty. Chosen under Content rather than File Condition: valid structure, no data.
Which failure to reach for, and what to assert for each, is covered in how to make a corrupted file for testing. For upload limits and type checks see testing file upload validation.
Sample PNG content
[Binary image], 1920×1080, RGBA, lossless.
This shows the shape of the file. Your download is generated fresh at the size you choose, so the values will differ.
How to open and verify the file
Open in any image viewer or browser; inspect with `file` or `pngcheck`.
Media type image/png · extension .png · category Images
Generate a .png file → · questions about sizes, privacy or cost are answered on the site FAQ.
Frequently asked questions about PNG files
What identifies a .png file?
A .png file begins with the bytes 89 50 4E 47 0D 0A 1A 0A, deliberately awkward: the high bit catches 7-bit transfers, and the CR-LF pair catches software that "helpfully" converts line endings. Those bytes are what a content-sniffing validator looks for, and what the Corrupted condition destroys.
How can a .png file be an exact number of bytes?
PNG is a sequence of typed chunks and decoders must skip ones they do not recognize, so the padding is a private ancillary chunk placed before IEND. The pixels are unchanged.
What can go inside the PNG file?
There are 4 content options for .png: Image, Bar chart, Pie chart, QR code. Choose more than one and they are combined into a single file, a section, sheet, slide or folder per option, rather than downloaded separately.
Can I download several broken PNG files at once?
Yes, select more than one File Condition and you get one ZIP containing a .png per condition, each named after its condition.
Can the PNG file use UTF-16 or a byte-order mark?
No, and deliberately. A .png file is a container rather than plain text, so rewriting its bytes as UTF-16 would not produce a UTF-16 document. It would produce a broken file. Use a text format such as CSV, JSON or XML for encoding tests.
How do I open or verify the PNG file?
Open in any image viewer or browser; inspect with file or pngcheck.