Machetes are classified as agricultural tools by United States law. Unlike stabbing knives and swords, which are classified as weapons, machetes have the distinction of usually being only sharpened on one side of the blade. You may see gardeners freely walking about at work openly carrying unsheathed machetes.
Under Penal Code 21310, it is illegal to carry a concealed knife that is capable of inflicting significant injury by stabbing. Dirks and daggers may be carried openly in a sheath — if the sheath is worn suspended from your waist. The terms “dirk” and “dagger” mean any knife capable of ready use as a stabbing weapon that may inflict great bodily injury. Machetes aren’t usually used for stabbing, and may not even qualify as a knife, so maybe that doesn’t apply. It may depend on what the tip looks like.
Under Penal Code 171b, it is illegal to bring or possesses some knives within any state or local public building. It also makes it a crime to bring some knives to any meeting required to be open to the public (a switchblade, any knife having a blade in excess of four (4) inches which is fixed — or is capable of being fixed — in an unguarded position by the use of one or two hands, or any weapon, including an illegal knife, that is generally prohibited in the state of California.)