Tanning beds are not safer than the sun.
Tanning beds are actually less safe than the sun and when you tan in a tanning bed you increase your risk of developing skin cancer more when you use a tanning bed.
You can still get skin cancer when tanning in the sun but you're much safer when tanning in the sun than you are when tanning in a tanning bed.
Tanning beds are actually not very safe at all for your health and skin because a tanning bed uses a lot of bad direct UV rays on your skin.
That intense UV ray from the tanning bed can increase your chance of developing skin cancer.
If you want a safer skin tan you should use the sunlight that is natural and outside.