A woman opened fire at YouTube's headquarters near San Francisco, sending employees scrambling into the street and three victims to local hospitals, police said.

Police did not release any further information on the suspect or speculate on her motives for the shooting at YouTube, which is owned by Alphabet Inc's Google.

"We did locate a victim with what we believe to be a self-inflicted gunshot wound. It's a female," San Bruno Police Chief Ed Barberini said at a news conference, describing the person police believe was the attacker.

One of the victims, a 36-year-old man, was listed in critical condition at San Francisco General Hospital.

A 32-year-old woman was listed in serious condition and a 27-year-old woman in fair condition.

Authorities did not release names of any of the victims.

Police in San Bruno warned people in to stay away from the address where YouTube is based.

A spokeswoman for Stanford Health Care said the hospital was receiving patients from the shooting incident at the YouTube offices.

Officers at the scene warned people near the campus to stay back, saying it was still possible someone could shoot through the windows.

Employees who evacuated the YouTube office and nearby buildings huddled under trees in car parks.

A YouTube product manager, Todd Sherman, described on his Twitter feed hearing people running, first thinking it was an earthquake before he was told that a person had a gun.

"At that point every new person I saw was a potential shooter. Someone else said that the person shot out the backdoors," he said.

"I looked down and saw blood drips on the floor and stairs. Peaked around for threats and then we headed downstairs and out the front," he added.

Google said in a statement that it was coordinating with local authorities. The White House has said US President Donald Trump was briefed on the situation.

Local television images showed YouTube employees walking out of the building with their hands raised.

Last month, YouTube announced it would ban content promoting the sale of guns and gun accessories, as well as videos that teach how to make guns.