Originally Posted by
offerendum
There are no tickets for St. Peter's Basilica. It is free and the long queues at the entrance are due to security checks.
Minor addendum: The lines to enter St. Peter's are also to enforce the dress code, and in June, on a hot day, it's worth noting that short pants (above the knee), short skirts, sleeveless tops, deep scoop necks, etc. are not allowed and that is enforced. Also, large bags and backpacks are prohibited.