American artist Gilbert Baker, who created the rainbow flag recognised around the world as a symbol of gay pride, has died.

His death was announced by close friend and rights activist Cleve Jones.

Baker, who was 65, came up with the iconic eight-colored banner for San Francisco's 1978 gay freedom day, a precursor to the modern pride festival, having taught himself to sew in his 20s.

The former soldier was heavily involved within the San Francisco LGBT rights movement and was a close friend of murdered activist and politician Harvey Milk.

"I am heartbroken. My dearest friend in the world is gone. Gilbert gave the world the Rainbow Flag; he gave me 40 years of love and friendship," Jones posted on Facebook.

"I can't stop crying. I love you forever Gilbert Baker."

He didn't reveal the cause, but the San Francisco Chronicle said the artist had died in his sleep at his home in New York late Thursday.