Stun guns are not considered firearms in California and are legal to carry. However, in California, one cannot possess a taser in state or local public buildings or public open meeting or in sterile areas of an airport.
According to California Penal Code § 244.5. Assault with stun gun or taser:
(a) As used in this section, "stun gun" means any item, except a taser, used or intended to be used as either an offensive or defensive weapon that is capable of temporarily immobilizing a person by the infliction of an electrical charge.
(b) Every person who commits an assault upon the person of another with a stun gun or taser shall be punished by imprisonment in a county jail for a term not exceeding one year, or by imprisonment in the state prison for 16 months, two, or three years.
(c) Every person who commits an assault upon the person of a peace officer or firefighter with a stun gun or taser, who knows or reasonably should know that the person is a peace officer or firefighter engaged in the performance of his or her duties, when the peace officer or firefighter is engaged in the performance of his or her duties, shall be punished by imprisonment in the county jail for a term not exceeding one year, or by imprisonment in the state prison for two, three, or four years.
(d) This section shall not be construed to preclude or in any way limit the applicability of Section 245 in any criminal prosecution.
§ 171b. Possessing weapon in state or local public building or public open meeting
(a) Any person who brings or possesses within any state or local public building or at any meeting required to be open to the public pursuant to Chapter 9 (commencing with Section 54950) of Part 1 of Division 2 of Title 5 of, or Article 9 (commencing with Section 11120) of Chapter 1 of Part 1 of Division 3 of Title 2 of, the Government Code, any of the following is guilty of a public offense punishable by imprisonment in a county jail for not more than one year, or in the state prison:
(5) Any taser or stun gun, as defined in Section 244.5.
§ 171.5. Possession of specified weapon in sterile area of airport
(b) It is unlawful for any person to knowingly possess within any sterile area of an airport, any of the items listed in subdivision (c).
(c) The following items are unlawful to possess as provided in subdivision (b):
(10) Any taser or stun gun, as defined in Section 244.5.
(d) Subdivision (b) shall not apply to, or affect, any of the following:
§ 626.10. Possession of other weapons in public or private educational institution; Exceptions
(a) Any person, except a duly appointed peace officer as defined in Chapter 4.5 (commencing with Section 830) of Title 3 of Part 2, a full-time paid peace officer of another state or the federal government who is carrying out official duties while in this state, a person summoned by any officer to assist in making arrests or preserving the peace while the person is actually engaged in assisting any officer, or a member of the military forces of this state or the United States who is engaged in the performance of his or her duties, who brings or possesses any dirk, dagger, ice pick, knife having a blade longer than 2 1/2 inches, folding knife with a blade that locks into place, a razor with an unguarded blade, a taser, or a stun gun, as defined in subdivision (a) of Section 244.5, any instrument that expels a metallic projectile such as a BB or a pellet, through the force of air pressure, CO[2] pressure, or spring action, or any spot marker gun, upon the grounds of, or within, any public or private school providing instruction in kindergarten or any of grades 1 to 12, inclusive, is guilty of a public offense, punishable by imprisonment in a county jail not exceeding one year, or by imprisonment in the state prison.
§ 12601. "Less lethal weapon"; "Less lethal ammunition"
(a) "Less lethal weapon" means any device that is designed to or that has been converted to expel or propel less lethal ammunition by any action, mechanism, or process for the purpose of incapacitating, immobilizing, or stunning a human being through the infliction of any less than lethal impairment of physical condition, function, or senses, including physical pain or discomfort. It is not necessary that a weapon leave any lasting or permanent incapacitation, discomfort, pain, or other injury or disability in order to qualify as a less lethal weapon.
(c) "Less lethal ammunition" means any ammunition that (1) is designed to be used in any less lethal weapon or any other kind of weapon (including, but not limited to, firearms, pistols, revolvers, shotguns, rifles, and spring, compressed air, and compressed gas weapons) and (2) when used in the less lethal weapon or other weapon is designed to immobilize or incapacitate or stun a human being through the infliction of any less than lethal impairment of physical condition, function, or senses, including physical pain or discomfort.
§ 12650. "Stun gun"
"Stun gun" as used in this chapter shall include any item, except a taser, used or intended to be used as either an offensive or defensive weapon capable of temporarily immobilizing a person by the infliction of an electrical charge.