How to Build an ESP32 Internet Radio
Published

An ESP32 is a Wi-Fi microcontroller that costs a few euros, and with a small audio board it plays internet radio on its own: no computer, no app, on the air a few seconds after you plug it in. It is less capable than a Raspberry Pi internet radio — no web player, no big music library — but it is cheaper, uses very little power and makes a good first electronics project.
What you need
- An ESP32 board. One with PSRAM, such as an ESP32-WROVER or many ESP32-S3 boards, buffers streams more comfortably.
- An audio board. A MAX98357A I2S amplifier drives a small speaker directly; a PCM5102A I2S DAC gives a line output for an amplifier or powered speakers. Some older projects use a VS1053 decoder board instead.
- A speaker and a USB power supply. Optional extras: a small display for the station name, and a rotary encoder or a few buttons.
Option 1: a finished firmware
- yoRadio — web radio firmware built on the ESP32-audioI2S library. You manage the station list from a web page on your network, and it supports displays, remote controls and MQTT. It can import KaRadio station lists.
- Ka-Radio32 — the ESP32 version of the long-running KaRadio project, also with a web interface.
- ESP32-Radio by Edzelf — a VS1053-based radio with a TFT screen.
Each has its own wiring notes and flashing instructions on GitHub; follow the ones for the audio board you bought.
Option 2: a few lines of Arduino code
With the ESP32-audioI2S library, a working radio is short:
#include <WiFi.h>
#include "Audio.h"
Audio audio;
void setup() {
WiFi.begin("your-network", "your-password");
while (WiFi.status() != WL_CONNECTED) delay(500);
audio.setPinout(26, 25, 22); // BCLK, LRC, DOUT: match your wiring
audio.setVolume(12);
audio.connecttohost("https://example.com/stream");
}
void loop() {
audio.loop();
}
Check the library's own examples for the version you install; its details change between releases.
Choosing streams that play well
- MP3 at 128 kbps or less is the safest choice. AAC works with the libraries above; HLS addresses ending in
.m3u8are hit and miss on a microcontroller. - https costs the chip extra work. If an https stream stutters and the station also offers an http address, try that.
- Getting the addresses: every station page on 72FM has a Stream address panel with a Copy button. For many stations at once, the free M3U playlists by country and genre are plain text files: open one and copy the lines you want into your firmware's station list.
Why build one
A radio you built plays whatever stream addresses you give it. It does not depend on a manufacturer's station directory, which is what left many shop-bought Wi-Fi radios silent — internet radio stopped working tells that story.
Frequently asked questions
Can an ESP32 play internet radio?
Yes. With an I2S audio board such as a MAX98357A amplifier or a PCM5102A DAC, an ESP32 plays MP3 and AAC streams on its own.
What is the easiest ESP32 radio firmware?
Finished projects such as yoRadio and Ka-Radio32 give you a web page to manage stations, so you only need to wire the board and flash the firmware.
Which radio streams work best on an ESP32?
MP3 streams at 128 kbps or less are the most dependable. HLS streams ending in .m3u8 often are not supported.
Where do I get radio stream URLs for an ESP32?
Every station page on 72FM shows its stream address with a Copy button, and free M3U playlists by country and genre list thousands of them.