Is codepen free to use?

yes, i did a search first

from a google search…

" We encourage you to read that in full, but in brief, people are free to copy it and their copy can be copied as well . There are many reasons for this, one of which is that it’s kind of awesome to browse CodePen knowing everything is usable for anything you want."

i found on another search:

https://blog.codepen.io/documentation/licensing/#:~:text=The%20gist%20of%20it%20is,it%20is%20subject%20to%20removal.

and i am confused

what is that white text on black background doing?

am i free to use any and all public codepens as i wish?

how do i know if a codepen is public

need i give credit or recoginition?

how do i give credit or recognition?

maybe provide an example

or simply use the code and not worry about it?

anything else i should know?

Yes, public code pens are free to use under the MIT license. Meaning that the code you put there can be used by others in whatever project, both for private use or commercial use and no credit is attribution is needed. It is wide open in other words.

What the white text on the black background is saying is that because of it being wide open and free to all that the creator of that code pen is not liable for any damage the code may cause and will not be responsible for it. While it is wide open, it means that it is wide open to be dangerous or could cause data loss or damages to systems. In other words, it is the wild wild west and you better understand the code you take off a public code pen and not just blatantly copy it and put it into a production system.

One way to know if a code pen is public or not is that if the creator is a PRO user, it could be private. Non pro users are always making a public pen. It is public by default. Learn more by reading about pen privacy at https://codepen.io/features/privacy

Usually if you write code on codepen, you are writing it there with the idea that it will be freely taken and used elsewhere. If you don’t want that, put your code in some private git repo or something.

Lastly, always assume that a pen may be code lifted from another pen or system. If you suspect that it is proprietary just don’t use it. Otherwise you are pretty free to clone, edit and republish as you see fit. You just can’t hold the original dev responsible if things you use from their pens goes wrong. :slight_smile:

4 Likes

Martyr2,

Many thanks!

so when i get to https://codepen.io/trending and Search CodePen, the results are public?

from that link:

Pens are public by default on CodePen, and all public Pens are indexed for public search, findable on your profile, and open source licensed.

Private Pens are none of those things. No one can see them unless you decide to share them. They aren’t shown in search, either through CodePen search or outside search engines. They can’t be seen on your profile. No license is applied to them.

  • Private content is not findable through public CodePen search. While logged in, you can still search your own content to find your own private content, however.

so ANY search results are public? even if posted by a Pro member? making their Pro code public and usable if found on a Codepen Search?

  • Private content is not findable on CodePen except by you on your your own profile while logged in. Nobody else can browse around CodePen and find anything private that you’d made. Not on your profile or anywhere else.

again, this tells me private content will NOT show on a codepen search… therefore what ever code i find on a codepen search is public?

please address this whole message :slight_smile:

i sincerely appreciate your time, explanations and clarity!

BIG relief i can use a code pen as i choose!

tell me…

do i owe you a $0.25 now?

My understanding is that if it is in search it is public and thus open to free use. While I am not a Pro user, I would suspect that if they mark a pen as private, it wouldn’t show in open search but they would have to share it exclusively to people.

So yeah, if you find it in a public search on code pen, it is free game. Again, not many people go put super secretive stuff on codepen that I am aware of. If they want something private, the Pro user can set it as such and it shouldn’t show up in search. But regular non pro users, everything is public. I regularly put public stuff out there on codepen as do many of the helpers here at Sitepoint. You can find many of our pens linked into posts where we freely expect that it will be forked and taken free of charge.

1 Like

That said, most of the time we’re using codepen here, its because someone’s either:

  1. posted their code, and we’ve fork/tweaked it to fix what problem they’re seeking to have fixed,
  2. making a broad example of how something “might work” , which is 100% meant to be forked/taken and adapted by the user we’re showing it to.

I’d say most of the time it’s in category 1; which is why we also regularly tell people not to post/have the moderators remove things like API keys or passwords from their code posts - CodePen is like SitePoint - if you put it up, anyone can see it. :stuck_out_tongue:
CodePen’s Private posts are “private” in the sense that they dont appear in searching or browsing, but they’re still a publicly accessible (but “unguessable”) URL - if you give someone the URL, and they share it around, suddenly your private pen not so private :wink:

3 Likes