Where can I find stock or custom ROMs for my Android device? There are several reasons to be looking for a ROM:


Upgrading or downgrading your stock ROM
Looking for firmware from a different region/language
Flashing a custom ROM for different features, removing bloat, etc.


But where can one find ROMs in the first place?  What sites are likely to have the ROM I need?

This question is intended to be canonical; please add to the wiki answer instead of posting separate answers.

See also: How do I update Android on my device?
Manufacturer Websites
While they don't usually host ROMs directly(exceptions include Samsung), you may find that they have software useful for upgrading stock ROMs, such as Samsung's tool Kies.  If you want to upgrade and stay stock then you should try official methods first.
Google Flagship Updates
Google hosts update packages for the flagship Nexus and Pixel devices at
https://android.clients.google.com/packages

You can't browse that link directly, but web search is your friend here.  Search for that link plus the code name of the device and the version you want; for example, searching android.clients.google.com/packages crespo ics results in a lot of pages with [this link][n1] -- the OTA Ice Cream Sandwich update for the T-Mobile Nexus S. Links for various &quot;factory images&quot; for Nexus devices can be found here.
XDA Forums
Probably the first place you should look after trying the official route is the XDA Developers' forums.  Stock ROMs are usually posted in the General sub-forum for your device, and custom ROMs in the Android Development sub-forum for your device.  No guarantees.
They don't have dedicated subforums for all devices, so if you have a less-popular device you should use the site search instead of the subforum search.
RootzWiki Forums
You may or may not want to check RootzWiki before XDA Forums above. Developers tend to move from forum to forum and RootzWiki provides devices for the best developers so a lot have jumped on board.
They have sections for many devices and for those that don't there is a General section. The forums tend to be divided into 3 sections per device (not always): General, Development (ROMS and such) and Themes.
ROM Manager
Many developers publish their custom ROMs in ROM Manager and even provide OTA-style updates through it.  Naturally, these ROMs can be easily flashed through ROM Manager / ClockWorkMod Recovery as well.
Android Forums
This site often has ROMs for more obscure devices, as well as the popular ones.
PDADB
This site provides a long list (about 800 pages) for all kind of devices, including Android, Blackberry, Symbian, and more. It misses a filtering mechanism, unfortunately...
TheUnlockr
Grouped by vendor, then device. Seems to be quite up-to-date and quite complete -- for sure one of the best resources.
Android @ MoDaCo
Similar to Android Forums.
SamMobile
This site posts stock Samsung ROMs from all over.  It does require you to sign up.
Note: you may need to register an account before downloading. If not, then the &quot;Download&quot; button is just point to the register page, and no actual file is downloaded.
Google
When in doubt, do a web search.  Make use of quotes (e.g., &quot;vibrant&quot; &quot;stock 2.2.1&quot;) in order to narrow the results and find what you need.
Shipped Roms
A collection of shipped ROMs. Contains ROMs for 40-odd devices.
MIUI
Translated from a popular Chinese ROM, MIUI is a highly customized version of Android with a large base of customization and theme options and a strong iOS aesthetic. Available for many devices and in Froyo (2.2), Gingerbread (2.3), Ice Cream Sandwich (4.0), Jelly Bean (4.3) options.
AOKP
Android Open Kang Project (AOKP) is just like Cyanogen Mod (CM) a Android Open Source Project (AOSP) based ROM. AOKP focuses on providing extensible settings with the disadvantage that less devices are supported in comparison with CM.
Samdroid Board
If you have a Samsung device and you want to unleash the potential of your device then this is the place to go for information, tutorials, files, firmware and many surprises!  Many top devs in the industry and talented people frequent and maintain many useful threads on this forum based site.
Android Central
Another popular Android forum, similar to XDA and RootzWiki.
OmniROM
Similar to CyanogenMod, OmniROM is a committed open-source project that provides ROMs for a variety of devices.
Replicant
Similar to OmniROM, Replicant is a committed open-source project that provides ROMs for several devices (mostly Samsung). It is a fully free Android distribution (with a marked aversion to binary blobs), putting the emphasis on freedom and privacy/security.
Lineage OS
Lineage OS is the successor to CyanogenMod(in the sense that the numbering scheme matches only).  It allows for customization of the buttons at the bottom of the screen and for root access.
Flashtool for Sony Xperia
Flashtool provides inbuilt tool - &quot;XperiaFirm&quot; that lets you download the stock firmware for Xperia devices. Using flashtool you can even install the downloaded firmware onto your Xperia device.