"Sare Jahan se Accha" (Urdu: , Hindi: ; Sare Jahan se Accha), formally known as "Taranah-i-Hindi" (Urdu: , Hindi: --; "Anthem of the People of India"), is an Urdu language patriotic song written for children by poet Muhammad Iqbal in the ghazal style of Urdu poetry. The poem was published in the weekly journal Ittehad on 16 August 1904. Publicly recited by Iqbal the following year at Government College, Lahore, British India (now in Pakistan) it quickly became an anthem of opposition to the British Raj. The song, an ode to Hindustan -- the land comprising present-day Bangladesh, India and Pakistan, was later published in 1924 in the Urdu book Bang-i-Dara.

Who wrote sare jahan se achha hindustan hamara? OK. Let's think. My stream of consciousness:
To answer this question, we should know that: "Sare Jahan se Accha" (Urdu: , Hindi: ; Sare Jahan se Accha), formally known as "Taranah-i-Hindi" (Urdu: , Hindi: --; "Anthem of the People of India"), is an Urdu language patriotic song written for children by poet Muhammad Iqbal in the ghazal style of Urdu poetry. The answer is poet Muhammad Iqbal.