You can legally convert a YouTube video to an MP3 on your iPhone when you use a link that you have the rights to download, then extract the MP3 separately from ordinary YouTube streaming. It’s a simple process.
The easiest way to get the MP3 file onto your phone is by opening the link in Safari, then pasting it into a modern web browser like Y2Mate, where you can choose MP3 format at a bitrate of up to 192kbps, with conversion taking up to 150 minutes. Tap “Download” when the file appears, then check out your Files app to find the file.
If you’re not happy with the quality of what you downloaded, there’s also another option: sync it over to your Mac, trusting it while it’s connected via USB, and syncing the Music app or using Finder to import your own music files directly into Apple Music instead. There are a few limitations, though, depending on the video.

YouTube Premium Offline Playback
YouTube offers a feature that allows Premium members to stream videos offline. This isn’t the same as converting an MP3, however; instead, this is just another form of downloading content, which may or may not be available if you don’t sign in and reconnect.
You must only use a YouTube share link if you either own or created the video, or were specifically authorized to download it. For example, some companies will let their employees access private training content but not distribute it beyond their own team.
YouTube
Safari (mobile)
Y2Mate
MP3 (up to 192kbps)
Up to 150 minutes
Files app
Music app
Finder
Apple Music
YouTube Premium
Conversion Steps in Safari
When using a mobile web browser such as Safari, simply copy the YouTube share URL (not the video itself), then paste it into a modern browser like Y2Mate. No sign-up or subscription is required. Choose MP3 as your audio format and hit the Convert button — the site will begin converting the video. When it’s done, tap Download to start the transfer.
After a successful transfer, you should see a completed audio file within the Files app on your iPhone. If Safari doesn’t immediately reveal it, look within Apple’s Files location instead.
Open the Files app on your iPhone, and select the Browse tab at the bottom-left of the screen. Within iCloud Drive, look under Downloads to find the newly-downloaded MP3 file. Alternatively, tap the arrow next to the search field to bring up the recent downloads entry point within Safari. From here, locate and tap the relevant file.
Syncing With Apple Music
While many devices will play back the completed file in-app, Apple won’t automatically import your MP3 into its Music library, nor will any third-party apps. However, you can still enjoy the music locally. A better option, especially if you want the MP3 to reside in an Apple Music synced library, would be to connect your Mac over a cable connection, trust it, and sync via either Finder or the Music app instead.
Connecting via a USB/USB-C cable will allow your Mac to identify the new device and prompt you to trust it. Once trusted, open up Finder and select your iPhone in the sidebar, then open the Music sync settings and choose the music and videos you want to include. Otherwise, open up the Music app, select the device in the sidebar, click Sync Settings in the top-right corner, choose the content you want, and click Sync.
Quality and Website Safety
If you’re concerned about quality, remember that the stated MP3 bitrate is an output ceiling and cannot restore any detail missing from the uploaded source. Many restricted or special types of videos can also fail during the process.
To avoid deception by shady websites, be wary of sites requesting you install them, ask for notifications, request sign-up information, or otherwise redirect you away from the page where you started. If they do, stop immediately.
Official Offline Alternative
YouTube does offer an official route to stream videos offline, known as YouTube Premium. You’ll need to sign in, reconnect, and follow YouTube’s rules for reconnection and time limits to enable offline viewing. Unfortunately, it doesn’t offer the same extracted MP3 file, either.