OnlineCompiler.io Code Runner: Online Compiler And Runnable Code Blocks Wordpress Plugin - Rating, Reviews, Demo & Download
Plugin Description
OnlineCompiler.io Code Runner adds an online compiler to WordPress. Put a Code runner block in a post or page (or the [onlinecompiler] shortcode in the classic editor), write the code, and readers get a code editor with a Run button right in the page. They can change the code and its input and run it again, with no account and nothing to install. Syntax highlighters only show code; this one runs it.
The code runs on OnlineCompiler.io, a code execution service, in an isolated sandbox with no network access. Nothing runs on your WordPress server.
Who it’s for
- Programming tutorials and blogs: every example in a post becomes one readers can try and change.
- Online courses and coding lessons: students practise in the lesson itself instead of installing a compiler.
- Teachers and schools: exercises with tests that students judge their code against.
- Documentation: runnable examples for an API, library or language.
Features
- 46 languages, with the code highlighted as readers type.
- Runs in a sandbox, not on your server: a fresh sandbox for each run, no network access, thrown away afterwards.
- Standard input: give the program its input; readers can change it.
- Exercises with tests: show a problem stored in your OnlineCompiler.io account, with its statement and starter code, and readers judge their code against its sample tests.
- Read-only examples, themes and heights: light, dark or the reader’s system setting; the editor fits the code or takes the height you set.
- Buttons and messages in English, Portuguese or Spanish.
- Search-friendly: the code is in the page as text before the editor loads, so search engines index it.
- Light on your site: the widget script loads only on pages with a Code runner, deferred, and each runner connects only when it scrolls into view (one showing a stored problem connects when the page loads).
Supported languages
Python, C, C++ (and C++20), Java, JavaScript (Node.js), TypeScript (Deno), C#, F#, Visual Basic, Go, Rust, PHP, Ruby, Kotlin, Swift, Dart, Scala, Groovy, Clojure, Haskell, OCaml, Elixir, Erlang, Racket, Common Lisp, Prolog, R, Julia, Octave, Fortran, COBOL, Pascal, Ada, D, Nim, Zig, Crystal, Perl, Lua, Bash, PowerShell, Objective-C, FreeBASIC, Assembly (NASM), SQL (SQLite) and DuckDB. Python includes NumPy, pandas, SciPy, scikit-learn and Matplotlib.
The widget, its options and its JavaScript API are documented at onlinecompiler.io/docs/widget. The plugin’s source code is on GitHub.
Shortcode
[onlinecompiler lang="python"]print("Hello")[/onlinecompiler]
Attributes, all optional:
lang: a compiler id such aspython-3.14org++-15, or a short name such aspython,cpp,java,jsorsql. The site default if left out.stdin: the program’s starting input. Usenfor a new line:stdin="3n4".theme:auto,lightordark.height: the editor’s height in pixels.readonly:1so readers can run the code but not change it.lang_select:trueorfalseto show or hide the language menu.problem: the id of a problem stored in your account.locale:ptoresfor the buttons and messages.
For code full of < and & (C++ includes, HTML), the block is the safer choice: the classic editor can change such code when it is saved.
External services
This plugin connects to OnlineCompiler.io, a code execution service run by RunCode Inc., to run the code in your code runners. Without it the code can’t run.
- On pages with a code runner, the reader’s browser loads the widget script from
https://onlinecompiler.io/widget.js. When the code runner scrolls into view (for a stored problem, when the page loads), the widget connects toapi.onlinecompiler.io, sending your widget key; the browser adds your site’s address (its origin), which is how the key’s allowed domain is checked. - When a reader presses Run or Judge, the widget sends the code, its input and the language to
api.onlinecompiler.io, and shows the result. With a stored problem, the widget also loads the problem’s statement and visible tests from there. - As with any website, the service sees the reader’s IP address. Readers don’t sign in and the plugin sends no other data about them.
OnlineCompiler.io terms of service and privacy policy.
Screenshots
A runnable Python example on a post: the reader pressed Run and the output shows under the code.
The Code runner block in the block editor, with the language, theme and height settings in the sidebar.

