ForHosting KIT · Developer Utilities

Ook! encoder and decoder

Hi becomes a 1069-character Ook! program built only from Ook., Ook! and Ook? in fixed pairs, one pair for each Brainfuck command. Paste an Ook! program to run it and read what it prints, or encode a short message for a puzzle. Free in your browser.

  • Free
  • Runs in your browser
  • No sign-up
  • Your data stays on your device
Use it from WebAPIEmailTelegramApp soon
If you enter
Text
Hi
Calculation mode
encode
You get
Encoding
ook
Input length
2
Output length
1,069
Command count
107

This Ook! encoder and decoder converts plain Latin-1 text into a valid Ook! esoteric program and runs Ook! programs back into the text they print. Ook! is a humorous Brainfuck dialect whose entire instruction set is written with only three tokens—Ook., Ook!, and Ook?—always used in fixed pairs that map one-to-one onto the classic eight Brainfuck commands.

What Ook! is and what this tool returns

Ook! was designed as a joke dialect of Brainfuck in which every command is a two-word phrase built from the tokens Ook., Ook!, and Ook?. Those three tokens are the entire vocabulary; punctuation on the word Ook is significant, so Ook. is not the same as Ook! or Ook?. Each of the eight Brainfuck operations maps to exactly one ordered pair: pointer right is Ook.

Ook?, pointer left is Ook? Ook., increment is Ook. Ook., decrement is Ook!

Ook!, output is Ook! Ook., input is Ook. Ook!, loop start is Ook!

Ook?, and loop end is Ook? three-token grammar and its Brainfuck-equivalent encode and run path that esolang chapters already describe.

Where Ook! fits in lessons and puzzles

Developers and educators meet Ook! in esoteric language surveys, capture-the-flag warm-ups that hide Brainfuck behind a joke vocabulary, and lightweight demos that show how a two-token command form can still implement a full Turing-complete-ish teaching tape when mapped carefully. Frontend teams can show encode and decode side by side so learners see that a long stream of Ook.

Ook. pairs is really a series of increments before a print, without inventing a custom table. Backend services precompute challenge strings for puzzle APIs or teaching sandboxes where students must reassemble valid pairs to unlock the next step. Quality engineers generate deterministic encode and decode pairs for contract tests so a middleware that claims Ook support cannot silently drop an unpaired trailing token or accept Ook?

Ook? as a legal command. Contest organizers precompute answer keys for short English phrases without trusting opaque web toys that pad incomplete pairs or ignore case in the wrong places. Product and education tools use the transform when a learner pastes an Ook program and the UI must show the recovered print stream under the documented three-token grammar.

Pair it with other classical and joke encoding helpers when you are building a small lab of free, deterministic text tools, and never treat Ook! as a substitute for modern authenticated encryption when real secrets are at stake.

Esolang and CTF practice

Encode short messages as Ook! programs and decode token streams for classroom worksheets, esolang surveys, and capture-the-flag warm-ups.

Brainfuck dialect demos

Show the three-token grammar Ook. / Ook! / Ook? as ordered pairs that map one-to-one onto the eight Brainfuck commands.

What does the Ook! encoder cost?

It is free in your browser on this page.

How do I decode an Ook! program?

Encoding is the default when mode is omitted. Tokens must appear as complete pairs of Ook. / Ook! / Ook?.

What happens if a token pair is malformed?

Odd token counts, unknown ordered pairs such as Ook? Ook?, non-token junk, and unmatched loops are all rejected instead of being guessed.

Which characters can I encode?

Characters with UTF-16 code units above 255 are rejected so program size stays predictable.

Is Ook! secure for real secrets?

No. It is a joke esolang dialect of Brainfuck with a public fixed grammar. Use modern authenticated encryption such as AES-GCM for real confidentiality.

Everything on this page is available programmatically. This section is for teams who want to wire it into their own systems; everyone else can just use the tool above.

POSThttps://api.kit.forhosting.com/enc/ook-encode

Prefer to automate it? One authenticated POST creates the task; the result comes back by webhook or a signed link. The same capability also runs here on the web, by email and from Telegram — and soon from our app too.

curl -X POST https://api.kit.forhosting.com/enc/ook-encode \
  -H "Authorization: Bearer $KIT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"text":"Hi"}'
{
  "text": "Hi"
}
{
  "task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
  "type": "enc.ook_encode",
  "status": "queued",
  "_links": {
    "result": "/tasks/tsk_…/result"
  }
}

The API is asynchronous: the call returns a task_id immediately and the result arrives by webhook. Polling is capped at 1 req/s per task.

Per request$0.002

Published price — no tokens, no invented credits. A failed task is never charged.

HTTPCodeMeaning
401unauthorizedMissing or invalid API key.
402insufficient_balanceYour balance doesn't cover the task price.
404unknown_typeThat task type doesn't exist.
429rate_limitedToo many requests. Use the webhook instead of polling.

Encode mode builds a deterministic single-cell program that adjusts a byte cell and prints each character; decode mode tokenizes the three-token grammar, rejects odd counts and unknown pairs as invalid_input, maps the rest to Brainfuck, and executes it with a bounded tape and step limit. Use it free in the browser for esolang lessons, CTF warm-ups, and reversible joke demos, or call the API at $0.002 per successful request when pipelines need reproducible Ook transforms.

What Ook! is and what this tool returns

Ook!. This endpoint encodes ordinary text as an Ook program that, when interpreted, prints that text, and decodes by interpreting a well-formed program and collecting output characters. The JSON response always includes result for the program or recovered string, encoding fixed to ook, mode set to encode or decode, input_length and output_length for the raw strings you sent and received, command_count for how many Brainfuck instructions were produced or executed, brainfuck for the intermediate command string (useful for teaching and debugging), and a formula string that restates the three-token pair rule. There is no silent fallback to Morse, Base64, or raw Brainfuck-only mode: either the payload is valid for the chosen direction, or the request fails with invalid_input. If you need classical ciphers, binary dumps, or modern authenticated encryption, use those dedicated endpoints; this landing answers only the Ook!

How text and mode are read and how malformed pairs fail

In decode mode the source is scanned for Ook tokens with the three legal endings; only whitespace may appear between tokens. An ordered pair that is not one of the eight legal commands likewise fails as a malformed token pair rather than being skipped. Unmatched loop brackets, pointer moves outside the fixed tape, input commands that would read from stdin, and runaway loops past the step limit are also rejected. The preferred payload fields are text for the message or Ook source and optional mode for encode or decode. Text accepts aliases such as input, value, s, message, plaintext, ciphertext, and program so forms and SDK clients can reuse existing column names. Mode defaults to encode when omitted and also accepts short aliases such as enc, encrypt, e, and to_ook for encode, and dec, decrypt, d, from_ook, and run for decode; any other string fails validation. In encode mode each character must be a Latin-1 code unit in the range zero through two hundred fifty-five, length is capped for practical program size, and the engine builds a single-cell delta program: it increments or decrements from the previous cell value to the next character code, then emits a print command, then translates every Brainfuck command into a space-separated Ook pair. An odd number of tokens means a pair was cut short and always raises invalid_input with an explicit malformed token pairs message. Missing text, empty text, non-string types, code units above two hundred fifty-five on encode, and unknown modes raise invalid_input. Pair the free browser run on this page with the priced API when you need the identical mathematical result inside an automated pipeline. Invalid inputs return invalid_input and are not charged, which keeps validation cheap while successful transforms remain a fixed item price.

Where Ook! fits in lessons, puzzles, and test fixtures

On this page the work runs entirely in your browser; through the API each successful lookup costs $0.002, failed validation is not charged, and nothing is stored after the response returns. That split—free interactive exploration and a priced, identical API—matches the rest of the KIT tier-A catalog and lets you move from a classroom demo to an automated pipeline without changing the transformed result.

Deterministic CI fixtures

Generate reproducible Ook programs and printed plaintext pairs for unit tests, golden files, and contract checks.

Read the full KIT documentation →