How to Add a Radio Player to Your Website (Free HTML Code)
Published

Putting a live radio player on a website takes a few lines of HTML. There are two sensible routes: the browser's own audio player pointed at your stream, which works with any station and costs nothing, or a ready-made player card if your station is in the public directory. This guide covers both, and the handful of things that trip people up.
Option 1: the HTML5 audio element
Every modern browser has a built-in audio player. Give it your stream's address and it plays:
<audio controls preload="none" src="https://stream.example.com/live"></audio>
controlsshows the browser's play button and volume.preload="none"stops the browser downloading audio before anyone presses play — important for a live stream, which never ends.srcis your stream URL, not your station's web page. How to find a radio station's stream URL explains where to get it.
In WordPress, paste the line into a Custom HTML block. On most site builders there is an "embed" or "HTML" element that takes it as it is.
The things that trip people up
Use an https stream on an https site. Browsers upgrade or block an http:// audio stream on a secure page, so a player that works on your laptop can stay silent on your live site. Most streaming hosts offer an https address; use it.
It will not autoplay. Browsers block audio that starts on its own. The listener presses play; that is a feature, not a fault.
HLS streams need care. Addresses ending in .m3u8 play natively in Safari, but other browsers may need a small library such as hls.js. A plain MP3 or AAC Icecast or Shoutcast stream plays everywhere.
There is no "now playing" by default. The audio element plays sound only. Song titles come from your streaming server — Icecast, for example, publishes its status as JSON — and showing them means a little JavaScript on your side.
Your website does not carry the audio. Listeners connect to your streaming server, not to your web host, so a busy player does not slow your site down. Your streaming plan's listener limit is what matters.
Option 2: a ready-made player card from 72FM
If your station is in the public Radio Browser directory — the one 72FM is built on — you can use a finished player instead: a card with your logo, station name and a play button, ready to paste.
- Open 72FM for broadcasters.
- Search for your station by name, or paste its 72FM page address.
- Copy the snippet and paste it into your site.
What you get, plainly:
- It plays the stream address the directory holds for your station; nothing is re-encoded, proxied or added.
- There are no adverts, trackers or cookies in the player.
- It loads only when it scrolls into view.
- It is free, in exchange for the credit line in the snippet: a visible link to your station's page on 72FM. If you want it without the credit, or styled to match your site, the broadcasters page says how to ask.
If your station is not in the directory yet, you can add it at radio-browser.info; once it is listed, it appears on 72FM too.
Only embed what you are allowed to
A player on your site is a way for people to hear a station. If it is your station, that is simple. If it is someone else's, ask them first — and if your site is a business playing the station to customers, the music licensing rules in playing the radio at work apply as they would to a radio on the counter.
Which to choose
- You run the stream and want full control — the HTML5 audio element, styled as you like.
- You want something that looks finished in two minutes — the 72FM player card.
- You are starting a station from scratch — how to start an internet radio station covers the streaming side first.
Frequently asked questions
What is the HTML code for a radio player?
<audio controls preload="none" src="your-stream-url"></audio>. Use your stream's direct address, not the station's web page, and an https address on an https site.
Why doesn't my radio player work on my website?
The most common causes are an http:// stream on an https site, which browsers upgrade or block, a web page address used instead of the stream URL, or an HLS (.m3u8) stream in a browser that needs a library to play it.
Can a radio player autoplay on my website?
Not with sound. Browsers block audio that starts without the listener pressing play.
Is there a free radio player widget for websites?
Yes. If your station is in the public Radio Browser directory, 72FM's broadcasters page generates a free player card with your logo and name, in exchange for a visible credit link.
Will a radio player slow my website down?
No. Listeners connect to your streaming server, not your web host, and the 72FM player card loads only when it scrolls into view.