Local building codes vary, but most require an egress window rather than an outside door for a basement bedroom to be considered legal. The egress window must meet specific size and accessibility requirements to provide a safe escape route. Always check with local regulations to ensure compliance before converting a basement space into a bedroom.