Last.fm Now Playing Widget
Build a hosted badge for a README, Notion page, blog, forum signature or OBS browser source. A public Last.fm username is enough.
Enter a public Last.fm username to build a badge.
You will get a PNG image URL, Markdown, HTML, iframe code and an OBS browser-source link.
Last.fm Now Playing Widget: Put a Live Scrobble Anywhere
A hosted badge turns one public Last.fm API request into an image that works where JavaScript does not. The generated PNG can appear in a GitHub README, a forum signature, a blog sidebar or any page that accepts a normal image URL. The separate live overlay can run inside an iframe or an OBS Browser source. Enter a public username above, choose the theme and copy the format that matches your destination.
What the badge displays
The widget calls the official user.getRecentTracks method and reads the newest returned row. If Last.fm marks that row as now playing, the badge says NOW PLAYING. If the newest row is a completed scrobble, it says LAST SCROBBLED and can add a relative time such as 14M AGO. The card also shows the track, artist and album when Last.fm supplies an album name.
That distinction matters because a currently playing row has no completed scrobble timestamp. The tool does not invent a start time or estimate elapsed listening. It labels the track as now playing and leaves the time blank. A completed row uses the UTC timestamp returned by Last.fm.
How the hosted PNG endpoint works
The generated image URL looks like /api/widgets/lastfm/rj.png?theme=dark. The .png suffix helps forums and Markdown parsers that expect a recognizable image extension. The endpoint validates the username, fetches the latest row and renders a 520 by 120 pixel PNG. It returns a readable error card instead of a broken image if the username cannot be found or Last.fm is temporarily unavailable.
Public embeds should not request Last.fm on every page view from every visitor. The image response is cached for 60 seconds and can be served stale for up to five minutes while a fresh response is prepared. That means a badge is near live without turning a popular README into an API request loop. The JSON mode uses the same recent-track data and a shorter 30-second freshness target for the iframe and OBS page.
Choosing PNG, iframe or OBS output
Use the PNG URL in a GitHub README, Markdown file, forum signature or basic HTML page. The Markdown snippet wraps the badge in a link to this tool, so visitors who click it can create their own. Use the iframe snippet for Notion, a website sidebar or a page that allows embedded HTML. The iframe refreshes itself every 30 seconds and can show newer artwork without changing the embed code.
Use the OBS browser-source URL when streaming. In OBS, add a Browser source, paste the generated URL and set the source near 560 by 180 pixels. Turn on the transparent overlay option if you want only the card to sit over your stream. The transparent mode affects the live overlay page, not the PNG badge.
Theme and display options
The dark theme is designed for code profiles, stream overlays and dark websites. The light theme works better on bright documentation pages and blog themes. You can remove album art for a compact text-first card, remove the relative time for a timeless badge, or remove the small Tools 4 Music credit. The username always appears on the badge so the source account is clear.
The shareable generator URL keeps your choices in the query string. That makes it easy to send someone a configured badge instead of asking them to rebuild the same settings. The image and overlay URLs use their own parameters, so an existing embed keeps its chosen appearance after you leave this page.
Privacy and API access
A now playing badge makes your current listening public by design. If you scrobble a private playlist, a work call soundtrack or a guilty pleasure, that name can appear wherever the image is embedded. Use an account that you are comfortable exposing and remove the image URL when you no longer want old pages to refresh.
Last.fm changed API access in late 2026. According to the November 26, 2026 update, only selected scrobbling and authentication methods remain free after December 1. Recent-track reads require Pro for the service that owns the API credential. Visitors do not need their own Last.fm login to view or create a public badge here.
What to build around the badge
A now playing widget answers what you heard most recently. The Last.fm Wrapped Generator summarizes your fixed rolling charts, the Last.fm Collage Generator turns top albums into a shareable grid, and the Last.fm CSV Export creates a dated archive plus a local stats dashboard. If the badge surfaces an artist worth exploring, continue with the Similar Artists Finder.
Scrobbles are listening records, not royalty calculations. Repeat plays, imported history and corrected metadata can all change what appears. For earnings estimates, use the Streaming Royalty Calculator. To work backward from a revenue target, use the Target Streams Calculator instead of treating a scrobble count as income.