Embed the Yes No Button on Your Website
Add a free random yes or no button to any page with one line of code. No account, no API key, no limits.
Last updated: October 18, 2026
<iframe src="https://yesnobuttonapp.com/embed/" width="100%" height="480" title="Yes No Button" loading="lazy" frameborder="0" style="border-radius:12px"></iframe> How to Add It in Three Steps
- Copy the snippet above with the Copy Code button.
- Paste it as raw HTML in the place on the page where you want the button. Most editors call this an HTML, embed or code block.
- Publish and test. Press the button once on the live page to confirm it loads.
The snippet is a standard iframe that loads yesnobuttonapp.com/embed/, a stripped-down page that contains only the button. Because it is hosted by us, improvements to the tool reach your page automatically.
Where to Paste It
The exact menu names change as site builders update, but the idea is the same everywhere: find the block that accepts raw HTML or an embed.
- WordPress: add a Custom HTML block and paste the snippet. In the classic editor, use the Text tab.
- Wix: add an Embed Code element and choose the option to embed HTML code.
- Google Sites: choose Insert, Embed and paste the snippet under the embed code tab.
- Notion: type
/embedand paste the addresshttps://yesnobuttonapp.com/embed/instead of the full snippet. - Plain HTML: paste the snippet anywhere inside the
bodyof your page.
Some platforms restrict custom code to certain plans or strip iframes entirely. If yours does, link to the full Yes No Button instead.
Sizing and Layout Tips
- Width: keep
100%so the widget adapts to phones. Cap the width with a wrapper (for example 400 to 600 pixels) if your page has a wide column. - Height: 480 pixels fits the button, the mode switch and the result. Go up to about 520 if your column is narrow.
- Accessibility: the snippet includes a
titleso screen readers announce what the frame is. Keep it if you edit the code. - Performance: the snippet uses
loading="lazy", so it only loads when visitors scroll near it.
Good Uses for an Embedded Yes No Button
- Classroom and course pages: a fair way to pick who answers next. See Yes No Button for Teachers and our guide to fair randomizers for classroom participation.
- Blog posts about decisions: let readers test a tough call on the spot.
- Game and party pages: a quick answer machine for games such as 20 Questions.
- Live sessions and workshops: a fun tiebreaker on a shared screen.
If you would rather build your own from scratch, our guide to a yes/no button in HTML has the code.
Frequently Asked Questions
General
Is the Yes No Button embed really free? ▾
Does the embedded button collect my visitors’ data? ▾
What size should I use for the iframe? ▾
Why is my embed blank or blocked? ▾
Can I change the colours or text? ▾
Do I have to link back to you? ▾
More tools from Yes No Button App: