Johann Baptist Mayrhofer (22 October[1] 1787 – 5 February 1836) was an Austrian poet and librettist.
In 1810 he began to study jurisprudence and theology at the University of Vienna, both of which courses he finished.
Deeply I have felt it, You faithful boy, tender and good; So steel yourself, beautifully bound, The noble, youthful courage!
Forty-seven Schubert songs and two of his operas (Die Freunde von Salamanka and Adrast) are based on texts by Mayrhofer.
Mayrhofer was a hypochondriac all his life: in 1836, during a cholera epidemic, he committed suicide by jumping from the window of his office in Vienna.