Prebid.js Ad Unit Config Generator

Build a Prebid.js ad unit config with banner, video, and native media types plus bidder params, then copy a ready pbjs.addAdUnits() snippet — all in your browser.

The Prebid Ad Unit Generator runs entirely in your browser. Your ad unit code, bidder names, and placement params are used only to build the config locally and are never uploaded to ArrayKit.

Open the OpenRTB Bid Request Generator

About Prebid Ad Unit Generator

The Prebid Ad Unit Generator turns a simple form into a valid Prebid.js ad unit config and a copy-paste pbjs.addAdUnits() snippet. Set the ad unit code, toggle banner, video, or native media types, add banner sizes like 300x250 and 728x90, choose an instream or outstream video context with a player size, and attach one or more bidders with their params — appnexus placementId, rubicon accountId/siteId/zoneId, and so on. It is built for ad-ops engineers and header-bidding developers wiring up new placements who want a clean starting object without hand-editing JSON. Everything is generated on your device: no ad tags, bidder ids, or placement params are ever uploaded, so you can prototype real production units without leaking your setup.

Features

How to use the Prebid Ad Unit Generator

  1. Enter the ad unit code (your GPT div id or slot name)
  2. Toggle banner, video, or native and fill in sizes or context
  3. Add each bidder and its params (e.g. appnexus placementId)
  4. Copy the pbjs.addAdUnits() snippet or the raw adUnit object into your wrapper

Example

Input

code: div-gpt-ad-1
banner: 300x250, 728x90
bidder: appnexus  placementId: 13144370

Output

pbjs.addAdUnits([{ code: 'div-gpt-ad-1', mediaTypes: { banner: { sizes: [[300,250],[728,90]] } }, bids: [{ bidder: 'appnexus', params: { placementId: 13144370 } }] }]);

A banner ad unit with one AppNexus bid, ready for your Prebid.js wrapper.

Common errors & troubleshooting

Frequently asked questions

What does the Prebid Ad Unit Generator output?
It outputs two things: a copy-paste pbjs.addAdUnits() snippet wrapped in a pbjs.que.push, and the raw adUnit object. Both contain your ad unit code, the enabled mediaTypes (banner/video/native), and a bids array with each bidder and its params.
How do I add multiple bidders to one ad unit?
Click Add bidder for each demand partner, type the adapter code (appnexus, rubicon, etc.), then add its params as key/value rows. Each bidder becomes an entry in the ad unit's bids array.
Does it handle video and native media types?
Yes. Toggle Video to set an instream or outstream context plus a player size, and toggle Native to add a starter native template with title, image, and sponsoredBy assets you can refine in the output.
Why is my placementId shown as a number instead of a string?
Most Prebid adapters expect numeric ids, so plain integers are coerced to numbers. Values with a leading zero or non-digit characters are kept as strings so ids like '007' or ad-server paths are not mangled.
Are my bidder ids and placement params uploaded anywhere?
No. The generator runs entirely in your browser. The ad unit code, bidder names, and params you type are never sent to a server, so you can build real production units privately.

Related tools

All ArrayKit tools