Display dimensions, file size, format, color depth

Inspect an image data URL’s media type, encoded size estimate, dimensions, aspect ratio, and pixel count.

freeworks offlinenothing uploaded
ToolImage Info
Input
Output
Put this on your own site

The frame below runs the same code as this page, in the reader's own browser. Nothing is sent to us, and nothing is sent to you.

Pick a dark background and the text and panels follow it, so the frame stays readable on a dark page.

Preview

How it works

The media type and Base64 length provide format and approximate byte size; when Canvas decodes the image, intrinsic width, height, aspect ratio, and pixel count are appended. Failed decoding leaves the metadata-only section.

  • Base64 size uses a three-by-four byte estimate.
  • Canvas dimensions are optional when a decoder cannot load the format.

Worked example

Inspect a PNG data URL
Input
											data:image/png;base64,iVBORw0KGgo=
										
Output
												MIME type: image/png
Format: PNG
Estimated file size: 8 B
											

When to use this

Frontends check uploads, build pipelines compare dimensions, and debugging reports record MIME type and payload size.

Edge cases

  • A malformed data URL reports unknown format instead of dimensions.
  • Base64 padding can make the simple estimate slightly high.
  • A declared image/png can still fail decoding and omit dimensions.

References