Hans Ernst (sometimes Ernest) Krøyer (31 January 1798 – 24 March 1879) was a Danish composer.
Krøyer was born in Copenhagen and the son of Bernt Anker Krøyer and Johanne Margrethe (née Schrøder), as well as the brother of Henrik Nikolai Krøyer.
He is best remembered as the composer of today's Danish national anthem Der er et yndigt land (There is a Lovely Country) in 1835, after lyrics by Adam Oehlenschläger.
He became cantor at the Royal Singers of the Chapel of Christiansborg castle in Copenhagen in 1844.