In this post, we will look at how to generate a Subscribe button for your YouTube channel, with or without the subscriber count.
First, head over to https://developers.google.com/youtube/youtube_subscribe_button:

Here we can enter the Channel name, and if the Subscriber count field is set to default (shown), you will see in the Preview the subscriber count:

For this to work, you will need your ensure the subscriber count to your channel is visible. To do this, go to https://studio.youtube.com/ and in the bottom left, select Settings:

Then click on Channel->Advanced Settings->Subscriber count and ensure Display the number of people subscribed to my channel is checked:

Now when you enter your channel name, the count will be displayed, and the Code block will be generated for you to embed in your website:

To use this in your webpage, paste the code as HTML:

And you will see the subscriber count:
![]()
Note, the number isn’t the exact number you will see, and it appears YouTube may round up or round down.
To hide the subscriber count, just set the field to Hidden:

Enjoy!

Explore AI, agents & Microsoft technology.
I share practical ideas, tutorials, and videos about AI, AI agents, Microsoft technologies, and the Power Platform.
Subscribe on YouTube →