Is thee a vaccine for encephalitis?

Yes, but not routine. There is not a vaccine for herpes virus or enterovirus, which are the more common causes of encephalitis. People living in or traveling to certain areas can ask their doctors about japanese encephalitis and tick-borne encephalitis vaccines, but those are not routine vaccinations in the U.S.