Little reminder!

We get asked by people sometimes if they can revert to an older version of a Pen. The answer is sadly no, we don't keep versions. In the early days of CodePen, we did, but we did it in kind of a bad way that was worse than not having it at all. Someday, we hope to build a smart versioning system into CodePen that learns from that, but that's a future thing.

There is a trick to keeping versions right now though!

You can export a Pen to a GitHub Gist. If you've connected your GitHub and CodePen accounts, it will create the Gist as owned by you, otherwise it will be anonymous.

The trick is you can keep exporting and it will update the same Gist

We got that cookin' a few years ago. Doing it this way will keep a version exactly as it was when you exported.

  • You can look at those versions through the Gist interface.
  • You can see diffs between the versions to see what has changed.

You used to be able to use the bookmarklet to bring versions back over with one click, but bookmarklets don't work on GitHub anymore because of Content Security Policy. This would be a cool little idea for a browser extension!