In forums I see more and more questions that use JSFiddle or JS Bin to share live examples.

Are these links safe?

Would it be possible that somebody includes malicious code in a public JSFiddle or JS Bin page?

  • 5
    JsFiddle is safe. We use a completely different domain for displaying the results so there's no same-domain privacy issues - you can't poke around with someone's cookies, etc.
    – Oskar Krawczyk
    Jan 22, 2012 at 9:34

3 Answers 3


Usually the risk is in being redirected to malicious code from server side. I don't think jsfiddle or jsbin have the capacity to harm as they are client side without there being malicious server side code that they are somehow perpetuating.


It is possible that someone may include code in a jsFiddle that is executed when you click the link. By using commonly known codes for crashing certain browsers they maybe able to crash your browser.

Someone could send you into popup hell or down a link path that is hard to escape or lock your browser with processor intensive operations.

In general these are very unlikely and will likely not cause an permanent damage to your machine.


Of course it is as possible to include malicious code there as in every other page. The JS is directly evaluated.

Add-ons like NoScript for Firefox can help here where you can for example temporarily enable JS for JSFiddle, permanently for SO and never for XYZ.

  • ok. The big difference is that on standard sites the scripts are under control of the site owner, that you can decide to trust or not. While places like jsfiddle or jsbin accept "collaborative scripting".
    – Christophe
    Jan 21, 2012 at 19:36
  • @Christophe But would you know whether the site owner has malicious code in there? Maybe because of a security issue within his CMS? Thats what NoScript is for.
    – TimWolla
    Jan 21, 2012 at 19:37
  • if I have a doubt, my choice is not to visit the pages. This is my current issue with jsfiddle.
    – Christophe
    Jan 21, 2012 at 20:34
  • 2
    @Christophe You should really try NoScript (If you are using firefox) then. You can temporarily enable JS for JSFiddle and Permanently for SO and never for XYZ.
    – TimWolla
    Jan 21, 2012 at 20:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.