How do I turn all my posts at once into a draft or on private?

How do i turn all my posts at once into a draft? Or how do I turn them on private and then set them back to public again?
I'm trying this because my blog's homepage isn't displaying properly and I want to see if that works.

I would like my blog to be visible only to users I choose – Select this option to create a private blog. If you want others to be able to view your private blog (and add comments, if you’ve enabled them) you’ll need to invite them to be a viewer.