XCODX |

LOLCODE Online Compiler & Interpreter

Select Language
Online Code Compiler
Full HTML IDE
Py main.py
Program Output Ready
  Welcome to XCODX Online Compiler

  Quick Start:
  Ctrl+Enter  Run code
  Ctrl+S      Save / Download
  Ctrl+L      Clear output

  Select a language and start coding.
Success
Operation completed

About LOLCODE

Born from the lolcat meme at its 2007 peak, LOLCODE was specified by Adam Lindsay at Lancaster University as a language whose keywords are internet-cat grammar: programs open with HAI, close with KTHXBYE, and print with VISIBLE. Beneath the jokes sits a workable imperative language with variables via I HAS A, conditionals through O RLY?, loops in IM IN YR blocks, and typed values it calls NOOBs, NUMBRs, and YARNs. It became one of the most recognizable joke languages ever, a staple of esolang lists and novelty golf answers alike. XCODX runs a LOLCODE interpreter in a real interactive terminal, so GIMMEH genuinely waits for the line you type, with nothing to install first.

Hello World in LOLCODE

HAI 1.2
  BTW VISIBLE prints a line to the terminal
  VISIBLE "HAI, WORLD!"
KTHXBYE

When to use LOLCODE

LOLCODE is a gateway drug for esolang exploration and a reliable laugh in teaching settings: because the semantics underneath are ordinary, students can write real loops and conditionals while the meme syntax keeps the room engaged. It appears in novelty and popularity-contest challenges on Code Golf Stack Exchange, and implementing a LOLCODE interpreter is a popular weekend project since the 1.2 specification is short, complete, and freely available.

Common questions

Is LOLCODE a real, usable language?

Yes, within limits. The 1.2 specification defines variables, arithmetic, string concatenation with SMOOSH, conditionals, switch-style WTF? blocks, loops, and functions declared with HOW IZ I. Multiple interpreters implement it faithfully. It is Turing complete and perfectly capable of FizzBuzz or text processing; what it lacks is libraries and any reason beyond joy to use it in production.

How does LOLCODE read input?

The GIMMEH statement reads a line from stdin into a variable as a YARN, LOLCODE's string type, which you can recast to a NUMBR with MAEK or implicit typecasting for arithmetic. In the XCODX terminal GIMMEH blocks until you press enter, so interactive prompt-and-respond programs behave exactly as the specification intends.

Why does every program start with HAI and end with KTHXBYE?

They are the mandatory program delimiters in the specification, standing in for the greeting and sign-off of lolspeak conversation. HAI traditionally carries a version number such as 1.2 so interpreters know which specification revision to apply. Omitting either is a syntax error in strict interpreters, which is itself part of the joke: meme grammar, rigidly enforced.

How LOLCODE runs on XCODX

Sandbox filename
main.lol
Entry point
single main source file
Editor grammar
plain text — no highlighter ships for this language
Reading stdin
GIMMEH
Input delivery
live WebSocket stream
Prompt flushing
flush manually before reading input
Compile limit
10 s
Run limit
3 s batch · up to 3 min live
Memory
256 MB per stage
Max source
50,000 characters

Default program on this page

HAI 1.2
  CAN HAS STDIO?
  VISIBLE "Hello from LOLCODE!"
KTHXBYE