Luther on Mary’s sinlessness and perpetual virginity
The following quotes from Luther’s Works indicate that he did believe in sinlessness of Mary and her perpetual virginity:
Mary also freely ascribes all to God’s grace, not to her merit. For though she was without sin, yet that grace was far too great for her to deserve it in any way. How should a creature deserve to become the Mother of God? Though certain scribblers make much ado about her worthiness for such motherhood, I prefer to believe her rather than them. She says her low estate was regarded by God, not thereby rewarding her for anything she had done, but, “He has done great things for me,” He has done this of His own accord without any doing of mine. For never in all her life did she think to become the Mother of God, still less did she prepare or make herself meet for it. The tidings took her all unaware, as Luke reports (Luke 1:29). Merit, however, is not unprepared for its reward, but deliberately seeks and awaits it.
Luther’s Works, Vol. 21
For this reason, too, Scripture does not quibble or speak about the virginity of Mary after the birth of Christ, a matter about which the hypocrites are greatly concerned, as if it were something of the utmost importance on which our whole salvation depended. Actually, we should be satisfied simply to hold that she remained a virgin after the birth of Christ because Scripture does not state or indicate that she later lost her virginity. We certainly need not be so terribly afraid that someone will demonstrate, out of his own head apart from Scripture, that she did not remain a virgin. But the Scripture stops with this, that she was a virgin before and at the birth of Christ; for up to this point God had need of her virginity in order to give us the promised blessed seed without sin.
Luther’s Works, Vol. 45