What is the maximum dimension in pixels for a GIF image?
Answer
65535 pixels
Answer
65535 pixels
The maximum dimension in pixels for a GIF image is 65,535 pixels. GIF stores the logical screen's width and height as unsigned 16-bit values, so each dimension can range from 0 through 65,535.
This limit comes from GIF's file structure rather than from the capabilities of modern displays or image editors. In the Logical Screen Descriptor, width and height each occupy two bytes. Two bytes provide 16 binary bits, and an unsigned 16-bit number has a maximum value of 2^16 − 1, or 65,535.
The limit applies independently to width and height, so the format can theoretically describe a canvas as large as 65,535 by 65,535 pixels, subject to practical memory and file-size constraints. It is also separate from GIF's color restriction: a huge GIF still normally uses indexed pixels and no more than 256 colors per frame. Confusion sometimes arises because 65,536 is the number of possible values, while 65,535 is the largest value itself.
Source: Wikipedia · fact-checked Aug. 2026