Remove Metadata From PNG Files
Understanding and removing metadata from PNG image files, including text chunks and EXIF data.
How PNG Metadata Differs From JPG
While JPG files use the EXIF standard to store metadata in marker segments, PNG files take a fundamentally different approach. The PNG (Portable Network Graphics) format was designed with a chunk-based architecture, where each piece of information — including metadata — is stored in a discrete, self-describing block within the file.
This architectural difference has practical implications for metadata removal. In JPG files, metadata is typically concentrated in a single APP1 marker segment. In PNG files, metadata may be distributed across multiple chunks, each with its own identifier and structure. This means that a thorough PNG metadata removal process must identify and handle each relevant chunk type.
Why PNG Files Still Have Metadata Risks
Despite PNG being primarily associated with web graphics and screenshots, PNG files can contain significant metadata. When you take a screenshot on a smartphone, the resulting PNG may include device information, timestamps, and in some cases, location data. Additionally, PNG files created by converting from other formats (like JPG) may retain metadata from the original format.
You can inspect the metadata in your PNG files using our EXIF Viewer to see exactly what information is stored.
Understanding PNG Chunks
PNG files are structured as a series of chunks, each consisting of a length field, a type identifier, the data itself, and a CRC checksum for error detection. The chunk type is a four-character ASCII code that identifies the purpose of the chunk.
Essential Chunks
Every PNG file must contain certain essential chunks:
- IHDR: The image header, containing width, height, bit depth, and color type
- PLTE: The palette chunk (for indexed-color images)
- IDAT: The image data chunk, containing the actual pixel data
- IEND: The image end marker, signaling the end of the PNG file
Ancillary Chunks
Metadata in PNG files is stored in ancillary chunks — chunks that are not required for the basic display of the image but provide additional information. These include text chunks, color profile chunks, and the EXIF chunk.
tEXt, iTXt, and zTXt Chunks
PNG files use three distinct text chunk types for storing metadata. Each has different characteristics and use cases:
tEXt (Uncompressed Text)
The tEXt chunk stores metadata as uncompressed key-value pairs. The key is a Latin-1 encoded string up to 79 characters, followed by a null separator, and then the value as a Latin-1 encoded string. Common tEXt keywords include:
- Title: A short title for the image
- Author: The name of the creator
- Description: A text description of the image
- Copyright: Copyright information
- Creation Time: When the image was created
- Software: The software used to create the image
- Comment: General comments about the image
iTXt (International Text)
The iTXt chunk is an extension of tEXt that supports internationalized text using UTF-8 encoding. It includes a compression flag, a compression method, a language tag, and a translated keyword. iTXt is used when metadata needs to contain characters beyond Latin-1, making it essential for multilingual content.
zTXt (Compressed Text)
The zTXt chunk stores text data compressed using the zlib/deflate algorithm. It follows the same key-value structure as tEXt but applies compression to the value portion. This is useful for storing large amounts of text metadata without significantly increasing file size.
All three chunk types can contain identifying information about the creator, the software used, and other metadata that may pose privacy risks. Our Photo Metadata Remover handles all PNG text chunk types to ensure complete cleaning.
The EXIF Chunk in PNG
While PNG doesn't natively use the EXIF format, an EXIF chunk was added to the PNG specification to allow EXIF data to be stored in PNG files. This chunk, identified by the type code "eXIf," contains the same EXIF data structure found in JPG files, including camera information, GPS coordinates, and timestamps.
When PNG Files Contain EXIF Data
PNG files may contain EXIF data in several scenarios:
- Smartphone screenshots that include device and location information
- PNG files converted from JPG or other EXIF-supporting formats
- Images processed by software that adds EXIF data to all output formats
- Camera-generated PNG files from devices that support PNG output
The presence of an EXIF chunk in a PNG file means it can contain the same privacy-sensitive information as a JPG file, including GPS coordinates, device serial numbers, and timestamps. This makes metadata removal just as important for PNG files as for JPG files.
How PNG Metadata is Removed
Removing metadata from PNG files involves identifying and stripping all ancillary chunks that contain metadata, while preserving the essential chunks required for proper image display.
The Removal Process
- Parse the PNG structure: Read the file to identify all chunks by their type codes
- Identify metadata chunks: Flag tEXt, iTXt, zTXt, and eXIf chunks for removal
- Preserve essential chunks: Keep IHDR, PLTE, IDAT, and IEND chunks intact
- Rebuild the file: Write a new PNG file with only the essential chunks
- Verify integrity: Ensure the new file has valid CRC values for all remaining chunks
This process is more straightforward than JPG metadata removal because PNG chunks are self-describing and independently addressable. However, it still requires careful handling to preserve the image data and ensure the output file is valid.
Step-by-Step Removal Guide
Here's how to remove metadata from PNG files using MetaClean:
- Go to the Photo Metadata Remover page
- Upload your PNG file by dragging and dropping it onto the upload area
- The tool will scan the file and display all detected metadata chunks
- Review the metadata to understand what information is embedded
- Click "Clean Metadata" to remove all metadata chunks from the file
- Download your cleaned PNG file — the image retains its full quality, transparency, and color profile
Using Command-Line Tools
For users comfortable with command-line tools, several options exist for PNG metadata removal:
- ExifTool: Can strip all metadata from PNG files with a single command
- PNGCRUSH: An optimization tool that can remove unnecessary chunks
- OptiPNG: Another optimization tool that strips metadata during compression
When to Clean PNG Files
You should consider cleaning PNG files in the following situations:
- Before uploading to websites: Web-optimized PNGs should be free of identifying metadata
- Before sharing screenshots: Screenshots may contain device information and timestamps
- After converting from other formats: Converted files may retain metadata from the original format
- When sharing with clients: Professional images should be delivered without metadata
- For portfolio作品: Showcase your work without revealing technical details about your setup
Remember that even seemingly innocuous PNG files can contain identifying information. It's always better to clean a file and be safe than to share metadata unintentionally.
Complementary Privacy Tools
For comprehensive photo privacy, combine PNG metadata removal with other privacy practices. Learn more about overall photo privacy with our Complete Photo Privacy Guide and explore how EXIF metadata works across different file formats.
Conclusion
PNG files present unique metadata challenges compared to JPG files, with their chunk-based architecture requiring different handling approaches. However, the privacy risks are just as real. Whether your PNG files come from screenshots, conversions, or direct camera output, removing metadata before sharing is an essential privacy practice.
Use our Photo Metadata Remover to clean your PNG files quickly and safely. The tool processes everything in your browser, so your images and their metadata never leave your device.
Frequently Asked Questions
Common questions about removing metadata from PNG files
PNG files don't natively use the EXIF format. Instead, they store metadata in text chunks called tEXt, iTXt, and zTXt. However, some PNG files may contain an EXIF chunk that stores standard EXIF data, similar to JPG files. The key difference is the storage mechanism, not the data itself.
PNG files use three types of text chunks for metadata: tEXt (uncompressed key-value pairs), iTXt (internationalized text with UTF-8 encoding), and zTXt (compressed text chunks). These chunks can contain anything from camera information to software details and descriptions.
Yes, the technical process differs. JPG metadata is stored in APP1 marker segments and requires parsing the EXIF structure. PNG metadata is stored in separate text chunks that can be individually identified and removed. The end result is the same — a clean file without embedded personal information.
Standard PNG files don't natively support GPS data in the same way JPG files do. However, if a PNG file contains an EXIF chunk (which some tools add), it may include GPS coordinates. Additionally, some PNG files created from converted sources may retain GPS data from the original format.
No, removing metadata from a PNG file has no effect on its transparency, color profile, or image quality. Metadata chunks are stored separately from the actual image data, so stripping them is a clean operation that preserves all visual properties of the image.