No one can argue the positive influence of a bathroom fan (not successfully, anyway). Yet, there is similarly no doubt that having to run ducting through the difficult-to-access spaces of the house is a major pain. And then there is having to cut a hole in your roof, wall, or soffit.
Any vented bathroom fan has to be vented to the outside. There are ductless bathroom fan options, which subsequently do not need to vent outside, but these have limited applicability.
For a bathroom fan to provide ventilation in accordance with prevailing building codes, it has to be vented outside. You cannot vent into another room or space in the house. There are ductless bathroom fans, but these can only be used for odor control, not ventilation.
Building Codes Forbid Internal Venting
Technically, any bathroom fan on the market can be vented internally, but to do so would contravene the International Residential Code (IRC) Section M1502.1, which states the following:
“The air removed by every mechanical exhaust system shall be discharged to the outdoors in accordance with Section M1504.3. Air shall not be exhausted into an attic, soffit, ridge vent or crawl space.”

Internal venting of bathroom fans is not just a building code violation; it is potentially damaging to the structural integrity and finishes of your home and your health as a result of the moisture carried in the exhausted air.
- Reasons Why A Bathroom Fan Should Not Be Vented Into The Attic
- Reasons Why a Bathroom Fan Should Not Be Vented Into a Crawl Space
- Types of mold and their adverse health effects
What About Ductless Bathroom Fans?
Ductless bathroom fans are not vented outside; however, they cannot be classified as ventilation systems (i.e., systems that remove moist, contaminated, or hot air from a room and provide a means by which fresh air can be supplied to replace the exhausted air).
Ductless bathroom fans run bathroom air through charcoal filters and are able to remove dust and odors from the air in the bathroom. The bathroom air is circulated, but not changed.
So, if you have another source of ventilation, such as an operable window, then you do not need a bathroom fan that provides ventilation, and you can use the ductless bathroom fan to control odors.
Often, in bathrooms that contain only a toilet and basin (no shower or bathtub), ductless bathroom fans can be used instead of vented bathroom fans because moisture is not an issue in these rooms.
However, you would still have to ensure a level of ventilation in the room. An operable window, or even just leaving the door open when the toilet room is not in use should be sufficient.
If you would like to learn more about ductless bathroom fans, you can check out my article on Are Ductless Bathroom Fans Any Good?