Image Metadata Viewer: File Size, Dimensions & Color Depth
Reads a JPEG, PNG, or WebP file's name, size, type, dimensions, aspect ratio, and color depth in your browser. No EXIF, GPS, or IPTC data. Nothing is uploaded.
Image Metadata Viewer
Click to upload or drag and drop
JPEG, PNG, WebP
Documentation
Image Metadata Viewer
An image metadata viewer reads the technical details stored in an image file without opening it in a photo editor. This tool reads a JPEG, PNG, or WebP file inside the web browser and shows its file name, file size, file type, last-modified date, pixel dimensions, aspect ratio, and color depth. The file is never sent to a server.
What information does this tool show?
After a file is uploaded, the tool lists these properties:
- File name โ the name of the uploaded file.
- File size โ shown in binary units (KiB, MiB, GiB), the units web browsers and operating systems normally use for file sizes.
- File type โ the file's MIME type, such as
image/jpeg. - Last modified โ the modification date and time recorded by the operating system for that file. This is not necessarily the date the photo was taken; copying or re-saving a file can change it.
- Dimensions โ the image's width and height in pixels, read by decoding the image in the browser.
- Aspect ratio โ the width-to-height ratio, reduced to its simplest whole-number form.
- Color depth โ the number of bits used to store each pixel, read from the file's header bytes.
What this tool does not show
Digital photos can also carry three other kinds of embedded metadata: EXIF (Exchangeable Image File Format), which cameras and phones write with details such as lens, aperture, shutter speed, ISO, and sometimes GPS coordinates; IPTC (International Press Telecommunications Council) fields, used by news organizations for captions, credits, and copyright; and XMP (Extensible Metadata Platform), an Adobe format for editing history and custom tags.
This tool does not read any of the three. It cannot show camera settings, GPS location, copyright fields, or editing history, even when a file contains them. It only reads the seven properties listed above. Someone who needs EXIF, IPTC, or XMP data should use a dedicated tool such as ExifTool, or check a photo's details through their operating system's file properties panel.
How to calculate file size units
File size is measured in bytes and converted to the largest binary unit that keeps the number readable. The tool divides the byte count by 1024 repeatedly until the result is between 1 and 1024, then rounds to two decimal places:
1unit index = floor(log(bytes) / log(1024))
2size = bytes / 1024^(unit index)
3The unit names are Bytes, KiB, MiB, GiB, TiB, and PiB โ binary units where 1 KiB equals 1024 bytes. This differs from the decimal KB/MB that some file managers use, where 1 KB equals 1000 bytes.
Example: a file of 2,500,000 bytes gives a unit index of 2 (MiB), so the size is 2,500,000 รท 1,048,576 โ 2.38 MiB, not 2.5 MB. The tool accepts files up to 50 MiB (52,428,800 bytes).
How aspect ratio is calculated
Aspect ratio is the width and height divided by their greatest common divisor (GCD), the largest number that divides both evenly:
1GCD(width, height)
2ratio = (width / GCD) : (height / GCD)
3Example: for an image that is 1920 ร 1080 pixels, the GCD of 1920 and 1080 is 120. Dividing both numbers by 120 gives 16:9.
How color depth is detected
Color depth is a property of the file's header, not of the decoded picture โ a browser always decodes an image into 8-bit-per-channel pixels internally, even if the source file used a different depth. To report the real value, the tool reads the raw bytes of the file itself instead of the decoded image:
- PNG: the IHDR chunk stores a bit-depth byte and a color-type byte, which together give bits per pixel.
- JPEG: a start-of-frame marker stores the sample precision and the number of color components; bits per pixel is precision ร components.
- GIF: the logical screen descriptor byte encodes how many bits per pixel the color table uses.
- WebP: the VP8X, VP8, or VP8L chunk indicates whether the image has an alpha channel, giving 24 bpp (RGB) or 32 bpp (RGBA).
Example: a standard JPEG photo with 8-bit precision and 3 color components (YCbCr) reports as 24 bpp (8 bits/channel, YCbCr). If the file's header cannot be matched to one of these four layouts, the color depth field is left out of the results.
Supported file formats
The tool accepts JPEG, PNG, and WebP files. Other formats, including GIF, TIFF, HEIC, and RAW camera files, are not accepted by the uploader.
How to use the tool
- Click the upload area, or drag and drop a JPEG, PNG, or WebP file onto it.
- The tool decodes the file locally and lists its metadata in a table.
- Click "Copy" next to any row to copy that single value.
- Click "Download Metadata" to save all the values as a text file.
Everything happens in the browser using JavaScript's FileReader and Image APIs. No file is uploaded to a server at any point.
Example
Uploading a JPEG photo that is 1920 ร 1080 pixels and 2,500,000 bytes, saved with 8-bit YCbCr encoding, produces:
| Property | Value |
|---|---|
| File name | photo.jpg |
| File size | 2.38 MiB |
| File type | image/jpeg |
| Last modified | (date and time from the file) |
| Color depth | 24 bpp (8 bits/channel, YCbCr) |
| Dimensions | 1920 ร 1080 px |
| Aspect ratio | 16:9 |
Frequently asked questions
Does this tool show GPS location or camera settings? No. Those come from EXIF data, and this tool does not read EXIF segments. It only reports file name, size, type, last-modified date, dimensions, aspect ratio, and color depth.
Is my image uploaded to a server? No. The file is read and decoded entirely inside the browser using JavaScript. It never leaves the device.
Why is my file size shown in MiB instead of MB? The tool uses binary units (1 KiB = 1024 bytes), which is how most operating systems report file sizes, rather than decimal units (1 KB = 1000 bytes).
Why doesn't the color depth field appear for my image? Color depth is only reported for JPEG, PNG, GIF, and WebP files whose header matches a known layout. If the header can't be parsed, the field is left out rather than showing a guess.
Why doesn't the "last modified" date match when the photo was taken? That date comes from the operating system's file-modification timestamp, not from the camera. Copying, re-saving, or transferring a file can change it, and it can differ from any capture date stored in EXIF data (which this tool does not read).
Can I upload a GIF, TIFF, or RAW file? No. The uploader only accepts JPEG, PNG, and WebP files.