A legal basement is one that complies with local building codes and zoning bylaws and is thus registered with the municipality as a livable space that can be rented out to prospective tenants.