Run Ballerina in Your Browser!
Pramitha Jayasooriya

Pramitha Jayasooriya @pramithamj

About: I'm a passionate computer engineer with a deep love for DevOps, SRE and software development, driven by a strong desire to learn and grow.

Location:
Galle,Sri Lanka
Joined:
Apr 5, 2024

Run Ballerina in Your Browser!

Publish Date: Nov 15
0 0

Instant Access, Powerful Engine

The Ballerina Online Playground eliminates the setup barrier. With a single click, you get a secure, sandboxed environment ready to write, compile, and execute Ballerina code.

Compiler

👉 Launch the Playground Here
https://ballerina-online-playground.pages.dev/

https://ballerina-online-playground.pages.dev/

Core workflow:

  • Code Editor (Left Panel): Write or paste your Ballerina code
  • Run Code: Click Run Code or press Ctrl + Enter
  • Output Panel (Right Panel): View compilation and execution output in real time
  • Editor Tools:

    • Reset → load sample code
    • Clear → start fresh

🤖 The Ballerina AI Assistant: Your Intelligent Co-Pilot

Ballerina AI

What sets this Playground apart is the integrated AI Assistant, powered by Google Gemini and OpenAI.

This is more than a chatbot — it’s a real-time Ballerina expert, making learning and debugging fast and intuitive.

Quick Actions:

  • Explain Code: Detailed, line-by-line explanations of your Ballerina logic
  • Fix Errors: Suggestions to resolve compilation/runtime errors
  • Optimize: Professional tips for performance and best practices
  • Help: Ask about syntax, modules, error handling, or any Ballerina concept

You can click the quick-action buttons or ask custom questions in chat.
AI-suggested code can be inserted directly into the editor with Insert Code, providing a seamless workflow.

📌 AI is fully context-aware and trained using ballerina.io documentation.


🧹 Real-Time Code Quality with Ballerina Lint

balarina lint

Maintaining high code quality is crucial.
The Playground integrates a Best Practices Checker inspired by the Ballerina Lint VS Code Extension.

As you type, the linter provides real-time feedback on:

  • Code quality
  • Ballerina best practices
  • Recommended conventions

VS Code Extension:
👉 https://marketplace.visualstudio.com/items?itemName=Pramitha.ballerina-lint


🏗️ Comprehensive Version Support (26 Ballerina Versions!)

Unlike simple online compilers, the Playground gives you full control over your execution environment.

You can switch between 26 Ballerina versions:

  • From 2201.3.0 (Swan Lake Update 3)
  • Up to 2201.12.0 (Swan Lake Update 12)
  • Including the Latest Development Build

Use Cases:

  • Testing compatibility
  • Reproducing version-specific issues
  • Educational purposes
  • Trying out older or newer runtime behaviors

📝 Monaco Editor Integration

Built using the same engine as VS Code, the Monaco Editor provides:

  • Syntax highlighting
  • Auto-completion
  • IntelliSense
  • Advanced editing features

⌨️ Supported Features & Keyboard Shortcuts

The Playground supports all core language features so you can focus on learning Ballerina efficiently.

Keyboard shortcut


🔒 Security and Limitations

The Playground is built with strict sandboxing:

  • No internet access
  • Isolated environment
  • Limited resources
  • Read-only file system

Disabled for security reasons:

  • HTTP clients
  • WebSockets
  • External APIs
  • Database connections
  • File system access
  • Services/listeners

This ensures a safe and stable environment for execution.


🚀 Ready to Start Coding?

Experience the best way to learn and prototype with Ballerina today.

👉 Start coding with the Ballerina Online Playground
https://ballerina-online-playground.pages.dev/


~ By Pramitha Jayasooriya

📬 Contact Details

LinkedIn: Pramitha Jayasooriya
GitHub: PramithaMJ
X (Twitter): PramithaMJ
Personal Website: PramithaMJ.live
Email: lpramithamj@gmail.com

Looking forward to connecting with you!

Comments 0 total

    Add comment