Which banner sizes to use
If you are only reserving a few slots, these cover almost everything: 300 × 250 (Medium Rectangle) inside the content, 728 × 90 (Leaderboard) in the desktop header, 300 × 600 (Half Page) in the sidebar and 320 × 100 or 320 × 50 on mobile. They are the sizes most advertisers buy, so they fill first and pay better.
The 300 × 250 is the wildcard: it fits on desktop and mobile, between paragraphs or in the sidebar. When in doubt, start there.
AdSense responsive units
AdSense now recommends responsive units, which pick a size to fit the available space. You still design the
slot, though: reserve its height in CSS so the page doesn’t jump when the ad loads (that’s what
CLS in Core Web Vitals measures). A min-height with the most
likely size is enough:
.ad-sidebar { min-height: 600px; } /* 300 × 600 */
.ad-content { min-height: 280px; } /* 336 × 280 or 300 × 250 */
Mocking up ad slots with placeholders
Every URL in the tables returns an image of the exact size. Drop it into the slot while you design and you’ll see how the page looks with the ad, without waiting for AdSense to serve anything in development:
<img src="https://ximg.es/mediumrectangle" width="300" height="250" alt="Ad">
<img src="https://ximg.es/leaderboard/f1f5f9/64748b.png?text=Advertisement" width="728" height="90" alt="">
Aliases (/leaderboard, /medrec, /halfpage…) accept the same colours, format and
text as any other image from the generator.
Two aliases whose size doesn’t match their name
ximg.es inherits its aliases from DummyImage and doesn’t change them, because thousands of pages use them. Two of them
return a different size from the one their name suggests: /wideskyscraper gives 60 × 600 (the IAB Wide
Skyscraper is 160 × 600; use /skyscraper160 for that) and /svga gives 1024 × 600 (SVGA is
800 × 600; use /svga800). The tables show what each alias returns, not what it promises.