Reports say the shooting began at about 23:20 local time on Wednesday at the Borderline Bar and Grill about 40 miles (65km) north-west of Los Angeles.
Officials have confirmed the suspect is dead inside the venue, but warned the number of victims may still rise.
Reports say at least 200 people were inside the bar attending a college country music night at the time.
Footage broadcast on local media shows people being carried away from the scene, apparently with bullet wounds.
Witnesses have described a scene of panic in the bar. Dozens of shots were reportedly fired by the suspect.
People used chairs to break windows to escape, while others sheltered inside toilets.
Reports say the suspect may have used smoke grenades and at least one gun during the attack.