This would really be great.

I saw people posting code that doesn't run because of syntax errors.

I told them that there are errors in the code but they didn't believe me.

I had to explain exactly which line doesn't run and why such a statement is not possible in this language.

It was really exhausting.

On jdoodle you can run code of many languages directly in your browser.


1 Answer 1


I don't think that's a good idea.

Most languages can't be ran in the client's browser. On sites like JDoodle, you're actually POSTing your code to their services, which then compiles and runs the code, and returns the result.

A service like that could be a significant added server load, and a huge security concern.

I'm pretty sure I've never seen a service like this that has the option to embed themselves in other sites, either.

  • I know they're run on their servers and not emulated using js. The snippet could be first run when the user clicks on a button. So crawlers or reloading the page won't trigger it. If you say it's a huge security concern how can jdoodle be capable of doing such a thing?
    – zomega
    Mar 2, 2020 at 13:07
  • 3
    @somega: It's JDoodle's one and only concern. It's their core business. They have experts specialized in running this kind of service. Just as SE is outsourcing image hosting, I don't think SE should do this (themselves).
    – Cerbrus
    Mar 2, 2020 at 13:08
  • If you think big effort is a problem for se then take a look at se chat...
    – zomega
    Mar 2, 2020 at 13:25
  • 3
    Building a chat is not something you can compare with hosting a service like this where you can submit, compile, run and return arbitrary code in many languages. It's a completely different set of problems.
    – Cerbrus
    Mar 2, 2020 at 13:28
  • Well, there is this tio.run website, which I believed is sponsorized by the people at codegolf.SE, which could be used as a backend for SE to support this, without increasing the load on SE's own servers. I believe it has an API available somewhere. Not sure tio.run server can handle the increase of load it would induce, though. But the idea is interesting, and the efforts on SE side would be limited. I'm pretty sure the people at the CodeGolf site would love to see that integrated.
    – dim
    Mar 2, 2020 at 15:00
  • @dimlostfaithinSE I didn't know tio. The list of supported languages is amazing...
    – zomega
    Mar 2, 2020 at 16:38
  • I think there should be some web services that provide free api for running many languages for the case of public source code, like that on stackoverflow. They might allow stackoverflow to use their servers for running code.
    – Arty
    Sep 22, 2020 at 9:53
  • Business ethics aside, there is no free API that will work on the scale SE would need it to work. It'd be pricy...
    – Cerbrus
    Sep 22, 2020 at 9:55

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .