By default the Pens, Posts, and Collections you create on CodePen are public. They show up in your public profile and live a public and social life — other users can heart them, find them in searches, and comment on them.

But you might not want that for every single thing you create. Perhaps you're just testing something out quick. Perhaps your masterpiece is still a work-in-progress. Or perhaps you do want to share your work, but only with a select few. That's where privacy is very useful!

PRO members can create private Pens, Posts, and Collections. Your private content is hidden from your CodePen profile and from search on CodePen.

How do I make something private?

Pens, Posts, and Collections all have a "Public" and "Private" toggle button. You can set your content to private when you first create it, or you can choose to make it private later.

Pens

When you create a new Pen, you can make it private on the first save by clicking the "Save as Private" button in the editor header.

Posts

When you write a new post, you can set it to private from the "Publish" menu at the right of the post editor. Slide the privacy toggle from "Public" to "Private".

All post drafts are completely private and can't be viewed by anyone except you until you publish the post. If you publish your post privately, it can only be read by people that you've given a direct link to the post.

Collections

When you make a new collection, you can set it to private on the "Create a New Collection" screen. Slide the privacy toggle from "Public" to "Private".

How do I change something from public to private?

To make a public Pen, Post, or Collection private later, slide the privacy toggle button from "Public" to "Private" and save your setting.

On Pens, the Privacy toggle is in the Settings menu.

On Posts, the privacy toggle is in the "Publish" menu at the right of the post editor.

On Collections, the privacy toggle is on the "Edit Collection" menu.

The Pen, Post, or Collection "slug" changes from just a few characters (e.g. "aGkBr") to many characters (e.g. cbcad1d82025fbc57a7d2620ae66d8e5). This is so random that it is impossible for anyone to guess. Keep in mind that any links to the content's public URL will break when you change it to private. Anyone visiting the public URL will see our friendly 404 page.

You can make any private Pen, Post, or Collection public by sliding the privacy toggle from "Private" to "Public".

The Private Icon

Your private Pens, Posts, and Collections will all get a privacy "lock" icon to help you recognize them in your profile. Only you can see this lock.

Can I still share my private work?

Yes, you can! If you give a link to your private Pen, Post, or Collection to someone else, they can see it. Nobody will be able to find a Pen you've marked as private unless you give them the link. But once you do share it, anyone with that link can see the Pen.

If you share a link to a private Collection, anyone with that link can see all of the Pens in the Collection, including private Pens. This is a great way to share a group of private work with a client or employer.

Will my private work show up in Google Search Results?

We do our best to make sure that it doesn't. There will be no links on CodePen to your private content anywhere. We also insert noindex meta tags to tell Google not to include these pages in search results. However, we don't control Google. If a private URL is shared and linked to a lot, there is some possibility that it could be found in Google.

What happens if I downgrade my account?

When you downgrade your account, you lose the option to make private saves. If you make changes to a private Pen, Post, or Collection after downgrading to a free account, it will become public when you save it. Otherwise, it will remain private.

Are Private Pens licensed?

Public Pens on CodePen are MIT licensed, but Private Pens have no license at all. This is so you can apply your own license if you wish. For example, if you wish to send work-in-progress to a client, you can still be safe in that you retain full ownership and the code can't be copied freely. Read More.