fileformer
search⌘KtranslateENexpand_moreupload_fileConvert
Converters8 file families · 44 direct conversions
What changes in a conversionarrow_forward
home / audio / ogg

Convert OGG Audio Free

Ogg: a stream of pages, not a file with an index

.ogg, .opus, .oga and .ogv files are all Ogg: a run of self-contained pages, each starting with “OggS” and carrying its own CRC-32, sequence number and a granule position that says how far into the audio it reaches. There is no table of contents, so players find their place by bisection and recover from damage by scanning for the next valid page. Open a file, or one of the two samples encoded here, to see every page and packet.

folder_openOpen .ogg / .opusClean Opus sampleDamaged copydownloadDownload
arpeggio.opus: encoded here with WebCodecs Opus at 64 kb/s
page 0 header, byte by byteoffset 0 · 47 bytes
capture pattern4F 67 67 53“OggS”: what a reader scans for to find or regain a page boundary
version000 (the only version ever defined)
header type02BOS: first page of a logical stream
granule position00 00 00 00 00 00 00 000 (64-bit little-endian, codec-defined unit)
serial number57 0B ED 5E0x5eed0b57: which logical stream this page belongs to
page sequence00 00 00 000: counts up per stream, so a gap means lost pages
CRC-3236 F5 0D CFmatches 0xcf0df536 computed here (poly 0x04C11DB7, init 0, not reflected)
segment count011 lacing values follow
segment table13adds up to 19 payload bytes in 1 packet

Every page in the file, to scale

23 pages · width = bytes · hover for detail
header pagesOpus dataCRC failed / cut offbytes that are not Ogg
23pages, average 3.4 KB
1logical stream (serial 0x5eed0b57)
10.000 sduration from the last granule position minus pre-skip
61 kb/saverage data rate (75.9 KB of Opus data)
1.47%spent on page headers + lacing (1.1 KB)
503packets reassembled from lacing values
Opusserial 0x5eed0b57 · 23 pages · 503 packets
version1
channels2 (family 0: mono/stereo)
pre-skip312 samples = 6.50 ms decoded then thrown away
input sample rate48,000 Hz (informational: Opus always decodes at 48 kHz)
output gain0.00 dB
vendorFileFormer / WebCodecs Opus encoder
packet durations480,960 samples in 501 packets
end trimming648 samples: last granule stops short of the final packet, so the padding is cut
duration10.000 s
TITLE=Arpeggio sampleARTIST=FileFormerDATE=2026
Opus TOC byte of every audio packet
CELT · FB 20 kHz · 20 ms · stereo501
packet size over time · largest 283 B
what a demuxer would notice
check_circleStarts with a page.“OggS”, version 0, at byte 0.
check_circleEvery complete page passes CRC-32.23 pages checked over header and payload.
check_circleEnds with an EOS page.The writer finished the stream cleanly.
check_circleHeader pages laid out as RFC 7845 requires.OpusHead alone on the first page, OpusTags finishing its own page, audio starting on a fresh page.
check_circleThis browser decoded it.10.000 s, 2 channel(s) in 25 ms; granule says 10.000 s.

Page by page

23 pages
#offsetserialseqflagsgranuletimesegsbytespackets ending hereCRC
000b570BOS00.00 s1471 headerok
1470b571none00.00 s11381 headerok
21850b572none24,0000.49 s274,07925ok
34,2640b573none48,0000.99 s264,07825ok
48,3420b574none72,0001.49 s264,07825ok
512,4200b575none96,0001.99 s254,07725ok
616,4970b576none120,0002.49 s264,23325ok
720,7300b577none144,0002.99 s253,92225ok
824,6520b578none168,0003.49 s274,07925ok
928,7310b579none192,0003.99 s254,07725ok
1032,8080b5710none216,0004.49 s254,07725ok
1136,8850b5711none240,0004.99 s254,07725ok
1240,9620b5712none264,0005.49 s253,13125ok
1344,0930b5713none288,0005.99 s2512725ok
1444,2200b5714none312,0006.49 s254,07725ok
1548,2970b5715none336,0006.99 s264,14225ok
1652,4390b5716none360,0007.49 s254,01325ok
1756,4520b5717none384,0007.99 s254,07725ok
1860,5290b5718none408,0008.49 s254,22525ok
1964,7540b5719none432,0008.99 s253,92925ok
2068,6830b5720none456,0009.49 s264,07825ok
2172,7610b5721none480,0009.99 s264,14325ok
2276,9040b5722EOS480,31210.00 s12181ok
seek lab · on the loaded file

Seeking without an index: bisection on granule positions

A player that wants second T jumps to the middle of the byte range, scans forward to the next “OggS”, reads that page’s granule position and halves the range again, the way libvorbisfile and libopusfile do. Each read below is an HTTP range request on a streamed file. Opus also needs 80 ms of pre-roll (RFC 7845 §4.6), so the search aims 80 ms early.

6.20 s
1read at 38,653 → page 12 ends at 5.49 s, before target → lower bound = 40,962
2read at 59,042 → page 18 ends at 8.49 s, past target → upper bound = 59,042
3read at 50,002 → page 16 ends at 7.49 s, past target → upper bound = 50,002
4read at 45,482 → page 15 ends at 6.99 s, past target → upper bound = 45,482
5read at 43,222 → page 13 ends at 5.99 s, before target → lower bound = 44,093
→range is small: read forward 4,204 bytes to page 14, which ends at 6.49 s. Decode from there, discarding the 80 ms pre-roll.
6reads (range requests)
14.4 KBbytes read to land on 6.20 s
48.3 KBbytes read by scanning from the start
29.8%of the linear cost
lacing lab · real pages written and CRC’d here

How packet sizes become a segment table

Ogg never stores a packet length directly. Each packet is cut into 255-byte segments; a lacing value of 255 means “keeps going”, anything smaller ends the packet. A packet that is an exact multiple of 255 therefore needs an extra 0. A page holds at most 255 lacing values, so big packets spill onto the next page with the continued flag set, and a page where no packet finishes gets granule −1.

Mixed sizesOpus 20 ms at 64 kb/sExactly 255 × nVideo keyframe
71.9 KBpayload in 6 packets
340 Bheaders + lacing on 2 pages
0.47%container overhead
p1 is 255 bytes, an exact multiple of 255, so it ends with an extra lacing value of 0.p2 is 510 bytes, an exact multiple of 255, so it ends with an extra lacing value of 0.p3 is empty: a single lacing value of 0. Legal, and how Opus DTX or a Vorbis “nothing” packet looks.A page holds at most 255 × 255 = 65,025 payload bytes; anything longer continues on the next page.
page 0 · 255/255 lacing valuesCRC 0x3cb18aa5
p0 100p1 255p1 0p2 255 ×2p2 0p3 0p4 255 ×3p4 235p5 255 ×244
header 282 B + payload 64,085 B · finishes p0, p1, p2, p3, p4, granule set
page 1 · 31/255 lacing valuesCRC 0xbc041bbe
p5 255 ×30p5 130
continued flag set (p5 started on the previous page) · header 58 B + payload 7,780 B · finishes p5, granule set

What can ride inside Ogg

codecfirst packet startsheadersgranule position countsextensionthis browser
OpusOpusHead248 kHz samples, always, including pre-skip; end-trim by stopping short.opusprobably
Vorbis01 “vorbis”3PCM samples at the stream’s own rate.ogg .ogaprobably
FLAC7F “FLAC”1 + NPCM samples at the stream’s own rate.ogaprobably
Speex“Speex ”2 + extraPCM samples at the stream’s own rate.spxno
Theora80 “theora”3last keyframe number shifted left by KFGSHIFT, OR frames since it.ogvno
Skeleton“fishead\0”allmetadata only: describes the other streams and can carry a keyframe index.ogx .ogvmaybe
container facts
MIME typesaudio/ogg, video/ogg, application/ogg (RFC 5334); audio/ogg; codecs=opus for Opus
Extensions.ogg (Vorbis by convention), .opus, .oga (any audio), .ogv (video), .spx, .ogx (anything else)
Magic bytes4F 67 67 53 00 “OggS” + version 0 at offset 0
Page header27 bytes + 1 lacing byte per segment; no index anywhere in the file
Page sizeat most 27 + 255 + 255 × 255 = 65,307 bytes; libogg aims near 4 KB
Packet sizeunlimited: packets span pages via the continued flag
ChecksumCRC-32, polynomial 0x04C11DB7, initial 0, no reflection, no final XOR, over the page with the CRC field zeroed
Granule position64-bit, meaning defined per codec; −1 when no packet ends on the page
Multiplexingconcurrent streams interleave pages, told apart by serial number
Chainingstreams back to back, each with fresh BOS headers; how Icecast radio dumps look
StandardsRFC 3533 (container), RFC 5334 (media types), RFC 7845 (Opus mapping), Vorbis I spec, Ogg FLAC mapping
timeline
1993Ogg beginsChris Montgomery starts the project that becomes the Xiph.Org container.
2002Vorbis 1.0The first stable codec carried in Ogg, a patent-free alternative to MP3.
2003RFC 3533The page format is published as an informational IETF RFC.
2008RFC 5334 · Theora 1.0Media types and .oga/.ogv/.ogx extensions; Theora video reaches 1.0.
2012Opus (RFC 6716)The IETF standardises Opus, which soon becomes the main reason Ogg files exist.
2016RFC 7845Ogg Opus encapsulation: OpusHead, OpusTags, pre-skip, 48 kHz granules.

Doing something with an Ogg file

Frequently Asked Questions

Can you convert OGG to MP3?

Yes. Add your .ogg file, choose MP3 as the output, and download it. OGG (Vorbis) and MP3 are both lossy formats, so the audio is re-encoded; picking a reasonable bitrate keeps the quality close. MP3 plays on almost every device, which is the main reason to convert from OGG.

Can Audacity convert OGG to MP3?

Audacity can import OGG and export MP3, though older versions needed a separate LAME encoder. You can skip that setup and convert OGG to MP3 right here in your browser instantly, with no install and no signup, then download the finished MP3.

Can you convert OGG to WAV or FLAC?

Yes. Converting OGG to WAV gives you uncompressed PCM audio for editing, while OGG to FLAC gives lossless compression. Note that OGG Vorbis is already lossy, so these targets preserve the current quality but cannot restore detail that Vorbis encoding removed. Both conversions are free here.

Can OGG be converted to MP4?

You can convert OGG audio into an MP4/M4A audio container, which wraps AAC audio that many Apple devices prefer. This changes the audio format rather than creating a video. The conversion is free, needs no account, and runs directly in your browser.