@Sherwin Gonzales and @Calvin Kwan,
The short story is that if you rent out an illegal unit in SF or Oakland, all the liability is on you, and none on the tenant. #1, the "illegal" unit is subject rent control, as is the other "unit" of the SFR, because it is being operated as 2 units (rent control law follows usage, not just actual structure..) In addition, they are likely subject to tenants' rights and just cause eviction protections, with caveats.. And if there is a fire... whoops! May not be covered by insurance!
But there's more...
If they dispute the legality of the unit and demand all prior payments of rent, they have the right to do so, based on the law. In other words, even if they lived in your illegal unit for 5 years, they could demand the 5 years of rent to be returned, legally.
Having said that, many landlords still do it, and many tenants do not enforce their rights, due to lack of knowledge, inability to spend time, money, or effort doing so, etc.. I do NOT have any illegal units. Others will only let friends, handymen, etc live in illegal units, since they feel that is a lower-risk situation.
As one last note, tenants have DIED inside illegal units because of inadequate ventilation, egress, etc. Certainly no matter if your unit is "non-conforming", illegal, or whatever, you bet your *** you better have it be safe!!!!! Anything less would be HORRIBLE and an injustice to any potential tenant and yourself...
Here's some more fun reading on professional tenants taking advantage of the illegal unit scam (scam back towards landlords..)
https://www.thelpa.com/lpa/forum-thread/222413/Renting-an-illegal-unit..html
Watch your asses! ;)
SF is promoting the conversion of formerly (officially) uninhabitable space into habitable space. Oakland is not as promoting about that right now, but the cities are generally all for adding more legal units. So just walk into the planning counter (hopefully with lots of pictures and anything else you have regarding the space, like ceiling height, utilities, structure etc.), tell them you want to convert an existing space into a new residential unit to help address the city's inadequate quantity of housing supply and housing crisis.
Be sure to pay your RAP fees and revenue tax before you go in though!!
Good luck guys! :)