All travellers visiting Tanzania need a visa to getting into Tanzania. Some countries are exempted from visa regulations.
Generally, visitors from non-commonwealth countries need a visa to enter Tanzania. Some commonwealth countries have an agreement with Tanzania, so they are also exempted from visa.
Applying for a visa in advance is most recommended by contacting the Tanzania Embassy from your home country. You just need to fill-up an application form for that.
The Tanzanian Government also introduced a web-based visa issuance system. Here Travellers can obtain Electronic Authorization from the government to enter Tanzania. The electronic authorization is the same as a visa.
Documents needed for this