AVI to MP4 Converter

Convert one AVI file up to 50 MB to MP4 in your browser without uploading it. DivX and Xvid video is re-encoded as H.264 with AAC audio; H.264 or HEVC video is stream-copied without re-compression.

Drop files here or choose files
Converted in your browser, not uploaded · one video at a time, up to 50 MB

DivX, Xvid, MS-MPEG-4 and MJPEG picture is re-encoded to H.264: some quality is lost, and it takes far longer than a container swap. H.264 or HEVC (H.265) picture is stream-copied into the MP4 instead, with no re-compression.

How to use

  1. Pick one .avi file: Drop it onto the box or click to choose it — one video per run, up to 50 MB. Dropping several files at once adds none of them and says how many were refused. Once a file is listed the drop area disappears, so use ✕ to swap it for another.
  2. Press Convert to MP4: On the first run the line underneath reads "Getting the engine ready…" while roughly 31 MB of processing engine is fetched and your file is inspected; a percentage appears only once the conversion itself is under way. Cancel is available at every stage and brings you back to the form without an error line.
  3. Read what the result says about your file: The first line names the route the inspection detected for your video — stream copy, or picture re-encoded to H.264 — along with the size before and after. The notes under it cover the sound, any extra tracks, the playback index and the metadata.
  4. Save the MP4: A video player appears when your browser can decode the result, and a card with a download button when it can't. Download gives you your original file name with .mp4 on the end. On a phone, Save to device opens the system share sheet if the browser offers file sharing, and otherwise just downloads the MP4.

How this AVI to MP4 converter works

Choose one .avi file of up to 50 MB, press Convert to MP4, and the page hands back an MP4 named after your original. The converter is FFmpeg compiled to WebAssembly (ffmpeg.wasm); it is downloaded with the page and runs on your own machine, so there is no upload, no sign-up and no account. The code has no server fallback either — the list of tools allowed to send a file away is empty, and the fallback function only raises an error — so a file your device can't finish ends in an error message rather than a transfer. Close the tab and both the file and the result are gone.

What happens inside depends on the picture codec the file inspection reports, not on the .avi on the end of the name. AVI is a container from 1992, and the same extension covers everything from a 2003 DivX download to a camcorder's MJPEG clip to the odd file someone re-wrapped from an MP4. An older codec is decoded here and encoded again as H.264 with AAC sound; a file that already holds H.264 or HEVC (H.265) picture is copied into the MP4 container with FFmpeg's -c copy, no encoder involved.

There is nothing to configure: no quality slider, no resolution, no frame rate, no container choice, no metadata switch. That also means the page can't pretend to be fast. The first run has to download and compile around 31 MB of engine and inspect your file twice before any conversion starts, and there is no percentage during that part — the bar only moves once the conversion is actually running. No timings are quoted anywhere on this page, for either route, because none have been measured.

Picture codec inside the .aviWhat this page does
MPEG-4 Part 2 — DivX, XvidRe-encodes to H.264, deliberately (see below)
MS-MPEG-4 (DIV3, MP43), MJPEG, DV, Cinepak, H.263, IndeoRe-encodes the picture to H.264 and the sound to AAC
H.264 or HEVC (H.265) — uncommon in an .aviCopies the streams into an MP4 container (-c copy)
No codec name could be readRe-encoded; a file whose streams can't be read at all is refused before any conversion

The route comes from the codec the inspection reports — the file extension plays no part in the decision.

Can you convert AVI to MP4 without losing quality?

DivX, Xvid, MS-MPEG-4, MJPEG and DV video is re-encoded as H.264 here, which can reduce quality. For DivX and Xvid, this is a compatibility choice made by the tool, rather than a limitation of the MP4 container. That encode is fixed at CRF 23 with the veryfast preset and 8-bit yuv420p, and the sound becomes AAC at 128 kbps whether it started as MP3, AC3, MP2, uncompressed PCM or even AAC. Nothing here raises those numbers, and no encoder puts back detail the 2003 encoder already threw away.

The lossless case is the copy route, and it only appears when the inspection reads H.264 or HEVC picture inside the .avi — a re-wrapped download, or the output of certain recording hardware. There the arguments are simply -c copy: the picture and sound streams that come along are written into the new container exactly as they were encoded, with no re-compression and no generation loss. Even then it isn't instant, because the engine still has to be prepared, your file is still inspected twice, and it is still read into memory and written back out.

Neither route is a compressor, and neither promises a particular size. On the re-encode route the size is a by-product of CRF 23 and can land above or below the original — a heavily compressed old AVI can genuinely come out bigger. On the copy route the streams aren't touched, but MP4 container overhead and the question of which tracks came along both move the number, in either direction.

If a smaller file is the real goal rather than a different container, Compress Video re-encodes with a quality level you choose.

DivX, Xvid and the other codecs hiding inside an .avi

DivX and Xvid are both MPEG-4 Part 2, and an MP4 can technically hold that codec — so re-encoding them isn't a container limitation. It is a decision written into this site's conversion code, and the comment beside it gives the reasoning: an MP4 built by swapping the container around MPEG-4 Part 2 video tends not to play in ordinary phone and web players, which makes it a worse result than an honest H.264 re-encode. So every DivX or Xvid AVI goes down the re-encode route here, and so do MS-MPEG-4 files (the DIV3 and MP43 tags left by DivX 3), MJPEG clips from older cameras, DV captures, Cinepak, H.263 and Indeo.

Whether a very old codec can be decoded at all comes down to what this build of ffmpeg.wasm includes. There is no list of supported codecs in the code and no special handling for any particular FourCC, so an exotic file either decodes and converts or fails with an error — and which codecs really do decode has not been tested here, so this page won't publish a compatibility list or claim that every AVI converts.

The 50 MB per-file ceiling is also felt more here than with other source formats, because those older codecs generally need more bytes for the same picture than H.264 does. A clip that would be comfortable as an MP4 can easily be over the limit as an .avi; there is no measured minutes-to-megabytes rule to offer, so the honest advice is to check the file size before you start. Also worth knowing: subtitles that came with a download as a separate .srt file are untouched, because the page reads only the single file you pick and has no way to merge an external subtitle track.

Want the file smaller but still an .avi? Compress AVI does that instead of changing the container.

What the MP4 keeps, and what it drops

Re-encode route: first picture track only · every audio track → AAC 128 kbps · subtitle and data tracks dropped · playback index written at the front
Copy route: track selection left to the engine's defaults · subtitles may or may not survive · playback index not moved
Both routes: location (GPS) data cleared · shoot date not copied · titles and comments normally kept · chapters left to FFmpeg's defaults

The two routes differ on almost every line, which is why the result panel describes your file instead of making one promise for both. On the re-encode route the arguments say it outright: -map 0:v:0 -map 0:a? -sn -dn. The first picture track and all audio tracks are written out, each audio track becoming AAC, while subtitle and data tracks are not written at all — including the XSUB graphic subtitles an .avi sometimes carries. If the first picture track happens to be a cover image rather than the video, that image is what you get, because nothing in the code skips attached pictures.

On the copy route nothing selects the tracks. There is no -map, so which streams come along is left to the engine's default stream selection and the code contains no ordering rule of its own. That is why a file with several audio tracks gets a warning that they can't all be promised, and why subtitle tracks may or may not show up: this route neither keeps nor discards them deliberately. Audio is copied rather than converted on this route, so an MP3 or AC3 track isn't turned into AAC — though whether the MP4 muxer will accept such a track is the muxer's decision, and a refusal surfaces as a conversion error.

Metadata behaves the same on both routes. The nine location keys every local output on this site is written with — including Apple's com.apple.quicktime.location fields — are blanked, and this page has no switch to keep them. The original shoot date (creation_time) is not carried over either, so a photo library may file the result under today's date. Titles, comments and similar global tags are normally kept, and chapters are left to FFmpeg's default behaviour.

One more difference matters if the MP4 is going on a web page. The re-encode route writes the playback index at the front of the file (-movflags +faststart), so a player that streams progressively can read the file's map before the rest arrives. The copy route does not move the index — harmless for playing the file locally, but it can mean a web player downloads the whole thing before it starts.

Stream-copied file whose index needs moving forward? Faststart MP4 does exactly that, again without re-encoding.

Limits, browser support, and when another tool fits better

One file per run, up to 50 MB, MP4 out, with no upload and without installing software of any kind. The file picker offers other videos besides .avi, and a file with a different extension is converted anyway with a note — by the same codec rule as everything else. Two kinds of file are turned away: one whose streams can't be read at all, which is reported as damaged or unreadable before anything is converted, and an audio-only file, since an MP4 made here needs a picture track. A DRM-protected video has no special handling, so it may fail at either of those points depending on where it breaks down.

Both routes use the multi-threaded build of the engine, which needs SharedArrayBuffer and cross-origin isolation. This page is served with the headers that provide them and therefore carries no ads or analytics. If your browser doesn't report cross-origin isolation, the page stops you on the click with a message rather than letting 31 MB download first; some browsers and in-app browsers simply don't offer that capability, in which case an up-to-date Chrome, Edge or Firefox is the fix. The two conditions are checked in different places, so a browser that reports isolation but withholds SharedArrayBuffer isn't stopped early — there the engine falls back to its single-threaded build and the run can end in the generic error instead.

Your whole file is read into memory, with the input and the output both present inside the engine, so a long clip on an older phone can run out of memory and end in an error rather than a download. The engine also gives up if it goes 75 seconds without reporting any progress. Cancel works while the file is being read, while the engine loads, during the inspection passes and during the conversion, returning you to the form with no error line — though an engine download that hasn't finished initialising may carry on in the background.

Some things are simply out of scope. The page can't improve a video: the copy route reproduces what was there and the re-encode can only lose a little, so there is no upscaling and no bitrate to raise. It can't repair a genuinely broken file, can't hit a size limit, and can't trim, mute, rotate, resize or choose tracks. It writes MP4 only, so there is no MP4-to-AVI page here, and it handles one file at a time rather than a folder.

When an upload form names a specific number of megabytes, Compress Video to Target Size aims at that figure directly.

How this tool is checked

  • The logic behind this tool is covered by 14 automated test cases (hand-checked examples, edge cases and invalid input), and they run again before every release.
  • Before each release, a real browser opens this page, runs it on sample files (including a damaged one) and checks the file it produces.
  • Your files are processed in your browser and are never uploaded to our server.
  • Formulas, figures and definitions are checked against the sources listed at the end of this page.

How we build and test our tools →

Frequently asked questions

Does converting AVI to MP4 lose quality?
Usually a little, because the picture has to be re-encoded. DivX, Xvid, MS-MPEG-4, MJPEG and DV are encoded again as H.264 at CRF 23, with the sound becoming AAC 128 kbps. The exception is an .avi whose picture is already H.264 or HEVC: that one is stream-copied with -c copy, so the streams it carries over aren't re-compressed.
Is my AVI uploaded, or does it stay on my device?
Your AVI stays on your device: ffmpeg.wasm converts it locally in your browser. If processing fails, the tool reports an error instead of uploading the video. Closing the tab clears the page's working file and result, so save the MP4 first. Files you have already downloaded remain on your device.
My file is DivX or Xvid — will this convert it?
Yes, by re-encoding it to H.264. An MP4 can technically carry MPEG-4 Part 2, but a bare container swap produces a file many players refuse, so this site's code deliberately re-encodes DivX and Xvid instead. Whether a much older codec decodes depends on what this build of ffmpeg.wasm includes.
Why is my AVI to MP4 conversion slow, and what is the 31 MB download?
The 31 MB is the processing engine, fetched on the first run only. After that, the re-encode route decodes every frame and compresses it again as H.264, single-threaded inside WebAssembly, and your file is inspected twice before it starts. No timings are quoted here because none were measured.
How large an AVI can I convert, and can I do several at once?
One file at a time, up to 50 MB. Dropping several files adds none of them and tells you how many were refused. The limit bites sooner with AVI than with newer formats, since older codecs need more bytes for the same picture, and an older phone's memory is the real ceiling.
What happens to subtitles, extra audio tracks and the shoot date?
Subtitles are dropped on the re-encode route (-sn), including XSUB, and may or may not survive a copy, which selects no tracks at all. A re-encode brings every audio track across as AAC; a copy can't promise all of them. On both routes, location data is cleared and the shoot date isn't copied.
Why does the page say my browser needs multi-threaded processing?
Because the conversion needs SharedArrayBuffer and cross-origin isolation, and your browser isn't reporting isolation for this page. Open it in an up-to-date Chrome, Edge or Firefox and reload; some browsers and in-app browsers don't offer the capability. The check runs on the click, before the engine downloads.
Can I pick the quality, or go from MP4 back to AVI?
Neither. This page has no settings — no quality, resolution, frame rate or bitrate — and it only writes MP4; there is no MP4-to-AVI page on this site. If the MP4 is still too large, send it through one of the video compressors here afterwards.

Add this tool to your website

Free for any website, personal or commercial. Paste the code where you want the tool to appear — it works on WordPress, Blogger, Google Sites, Notion and plain HTML.

This tool needs a browser mode that only works on its own page, so the embed shows a card with a button that opens it in a new tab.

<div class="gingertool-widget" data-embed="https://gingertool.com/embed/en/video/avi-to-mp4/" data-height="240" style="font-size: 13px; line-height: 20px; margin: 6px 0 16px; text-align: left">AVI to MP4 Converter &#183; <a href="https://gingertool.com/en/video/avi-to-mp4/">Gingertool</a></div>
<script src="https://gingertool.com/embed.js" async></script>

Please keep the credit link below the tool. Embedded tools show no ads.

Step-by-step: Google Sites · Blogger · WordPress · Notion

Cite this tool

Using a result in a report, paper or assignment? Copy a ready-made reference.

APA
Gingertool. (2026). AVI to MP4 Converter [Online tool]. Retrieved November 21, 2026, from https://gingertool.com/en/video/avi-to-mp4/
MLA
“AVI to MP4 Converter.” Gingertool, November 21, 2026, https://gingertool.com/en/video/avi-to-mp4/. Accessed November 21, 2026.
BibTeX
@misc{gingertool-avi-to-mp4,
  author = {{Gingertool}},
  title = {AVI to MP4 Converter},
  year = {2026},
  url = {https://gingertool.com/en/video/avi-to-mp4/},
  note = {Accessed: 2026-11-21}
}