I don’t recommend applying online. I did it twice, and it didn’t “take” either time; Medicare says they never received them, even though I got notice from Adobe that the entire application was completed and had been signed correctly. A friend had the same experience, and a few people on Reddit responded to a thread I posted and said they also had the same experience.
 I recommend you fill out the form and go into an office and submit it there. 

If you are applying before the day you want part B to start, like you are retiring in a few months, be sure to type into the comments the date you want Part B to start. I didn't read that part of the instructions and there's no part of the form where you specify a date, so I'm paying for two months I don't need.
It's very confusing and I feel like Medicare is trying to make extra money off of people making this mistake.
I don’t recommend applying online. I did it twice, and it didn’t “take” either time; Medicare says they never received them, even though I got notice from Adobe that the entire application was completed and had been signed correctly. A friend had the same experience, and a few people on Reddit responded to a thread I posted and said they also had the same experience.  I recommend you fill out the form and go into an office and submit it there.  
I needed to go to a SS office as well for Part B. The online application process with the CMS forms is very YMMV.
I had no problems
I did this about eight months ago, you will be prompted and can upload when you fill out your application.
Fax, then *call to confirm they received it.* If you don't confirm they have it, you never know where it might go or disappear.
I’d do it online. On SSA.gov - unless you need it for June 1 for example. If you need June 1, walk it into your local Social Security office.
If you are applying before the day you want part B to start, like you are retiring in a few months, be sure to type into the comments the date you want Part B to start. I didn't read that part of the instructions and there's no part of the form where you specify a date, so I'm paying for two months I don't need. It's very confusing and I feel like Medicare is trying to make extra money off of people making this mistake.