Skip to content
ExtensionTry FlowPick Browser Extension

Free open-source extension to sniff & download M3U8, video, and audio from any page. Merges locally — no FFmpeg needed. Privacy first, zero data collection.

Add to Browser

HLS Encrypt & Decrypt Toolkit

Processed locally in your browser — no upload, no privacy risk

m3u8 content

Paste your m3u8 playlist here, or click “Load file” to import index.m3u8

Output settings

An AES-128 key is 16 bytes, i.e. 32 hex characters. The segments themselves still need to be encrypted (see the FAQ below).

How HLS AES-128 encryption works ​

HLS AES-128 encryption has three parts, and all three must match:

  1. The key file — 16 bytes of binary data, deployed on your server (commonly named encryption.key).
  2. The playlist tag — #EXT-X-KEY, which tells the player where to fetch the key and which IV to use.
  3. Encrypted segments — each .ts segment encrypted with AES-128-CBC and PKCS7 padding.

The player fetches the key before requesting segments and uses the IV to decrypt them. Change the key, the IV, or the segments and decryption fails.

Diagram of the HLS AES-128 flow: the key file, the EXT-X-KEY tag and encrypted segments must match the player's decryption parameters

Figure 1: the three artefacts prepared on the server must line up with the player's decryption parameters.

EXT-X-KEY attributes ​

AttributeDescription
METHODEncryption method. HLS uses AES-128, but SAMPLE-AES (DRM) and NONE also exist
URILocation of the key file, relative or absolute; the player must be able to fetch it
IV128-bit initialisation vector in hex prefixed by 0x; when omitted the segment's media sequence number is used
KEYFORMATKey format, identity by default (a plain AES-128 key)
KEYFORMATVERSIONSKey format version, 1 by default

What the three modes do ​

  • Inspect encryption lists the METHOD, URI and IV of every #EXT-X-KEY tag — useful when a player reports a decryption failure.
  • Add / replace encryption tag inserts a tag before the first segment, using a key you type or generate, and replaces any existing #EXT-X-KEY (a playlist normally needs only one).
  • Remove encryption tag deletes every #EXT-X-KEY line, for playlists whose segments are already decrypted or were never encrypted.

Encrypting segments with FFmpeg ​

This tool handles the playlist and the key; segment encryption can be done by FFmpeg or by our MP4 to M3U8 converter:

text
# 1) generate a random 16-byte key
openssl rand 16 > encryption.key

# 2) write the key info file: key URI, key file path, IV
printf 'encryption.key\n/path/to/encryption.key\n%s\n' "$(openssl rand -hex 16)" > key_info

# 3) segment and encrypt; FFmpeg writes #EXT-X-KEY automatically
ffmpeg -i input.mp4 -c copy -hls_time 6 -hls_playlist_type vod \
  -hls_key_info_file key_info -hls_segment_filename "seg-%03d.ts" index.m3u8

If you only need to rewrite an existing tag — for example after moving the key to a new domain — use Add / replace instead of re-encrypting, but make sure the key and IV still match how the segments were encrypted.

Security and compliance notes ​

  • Deploy the key file together with the playlist and restrict access (for example by Referer).
  • AES-128 is entry-level protection: the key URI must remain publicly requestable, so it cannot stop a determined scraper.
  • Only encrypt content you own or are licensed to distribute; do not use it on someone else's paid content.

Privacy ​

Playlists and keys are processed entirely in your browser — nothing is uploaded and nothing is logged. The generated key is a 16-byte binary file ready to be deployed alongside your encrypted segments.

Encryption options compared ​

MethodKey managementResistance to scrapingPlayer supportTypical use
No encryptionNoneNoneEverythingPublic content, internal sharing
AES-128A single 16-byte key fileEntry level (the key URI must stay public)All mainstream players and browsersHotlink protection, restricted distribution
SAMPLE-AESRequires Widevine / FairPlay style licence serversStrongDevices with the matching DRM stackPaid content (not offered here)

Note that AES-128 exists to raise the cost of scraping, not to protect content. The key URI has to be requestable by the player, so the key can technically be retrieved. Real content protection needs DRM, and DRM cannot run entirely inside a browser.

Troubleshooting decryption failures ​

Work through this list — most problems map to exactly one row.

SymptomLikely causeHow to check
Key request returns 403 / 404The key file is missing or the path is wrongOpen the URI from #EXT-X-KEY directly in a browser
Blocky or noisy pictureKey mismatch, or the IV differs from encryption timeVerify the key file is 16 bytes and the IV is 0x plus 32 hex characters
Audio plays, no pictureThe KEY tag is in the wrong positionConfirm #EXT-X-KEY appears before the first #EXTINF
Some segments fine, others brokenSegments were encrypted in batches with different IV rulesMatch each segment to its media sequence number
Works in Safari, fails in ChromeThe key endpoint is missing CORS headersCheck the Access-Control-Allow-Origin response header

References ​


Content maintenance: this page is maintained and reviewed by the EZ Online Tools team; technical statements are checked against the specifications listed above. Last updated: 2026-10-16

FAQ

Is this tool free?

Yes, completely free. No registration or sign-in required.

Are my files uploaded to a server?

No. Everything runs locally in your browser; files never leave your device.

What is the file size limit?

It depends on your device memory. Staying under 500MB per file is recommended.

Does it work on mobile?

Yes, on modern browsers such as Chrome and Safari. Smaller files are recommended.

Related tools