ForHosting KIT · Developer Utilities

Flag semaphore translator

HELLO becomes five pairs of flag positions, one per letter: E, for instance, is L:HIGH+R:DOWN, left flag high and right flag down. Words are split by a slash, and pasted positions decode back to letters. 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
HELLO
Calculation mode
Encode
You get
Encoding
flag_semaphore
Input length
5
Output length
78

This flag semaphore translator converts plain text into International flag-semaphore arm position names and decodes those position tokens back into readable letters and digits using a fixed, deterministic chart. Encode mode maps each letter and digit to a left-hand and right-hand pose written as L:POS+R:POS, joins successive letters with a single space, and separates words with a slash so multi-word phrases stay unambiguous. Decode mode reverses the process: it reads only well-formed position tokens, normalizes flexible separators, looks up every pair in the same table, and fails clearly when a character or pose is unknown.

What flag semaphore is and what this tool returns

Flag semaphore is the standard two-flag visual alphabet used at sea, in scouting, and in classroom history of signaling. A signaller holds one flag in each hand and places each arm in one of a small set of named positions around the body: down, low, out, high, up, and the two across-body poses used when both flags sit on the same side. Those combinations spell Latin letters A through Z and the dual-use digits zero through nine that share selected letter poses on the classic chart.

This page implements that public mapping as plain text tokens of the form L:POS+R:POS so every result is copy-pasteable, searchable, and suitable for automated tests without image recognition. Encode mode uppercases letters, expands each supported character to its left and right positions, joins letters with one space, and joins words with space-slash-space so a human or machine can tell word boundaries without timing video frames.

Decode mode accepts the same textual convention, tolerates flexible punctuation between L and R sides, and rebuilds uppercase letters (preferring letters over digit labels when a pose is dual-use). If you need live video analysis, mechanical tower semaphore, or Japanese flag syllabary poses, use a specialized tool; this landing is only for the text encode and decode contract that teachers, cadets, and test authors share.

Where a flag-semaphore translator fits in learning, heritage, and tests

Students meet flag semaphore when they study maritime history, prepare for scout signaling badges, or solve timed classroom drills that require converting short words both ways without paper charts. Naval heritage groups and museum educators use a text encoder to check practice phrases before a live demonstration and a decoder to verify copy after a session. Puzzle designers and game authors generate deterministic semaphore riddles for escape rooms and CTF-style challenges where the same clue must always encode the same way.

Pair it with other text encoding helpers when you are building a small lab of free, deterministic utilities for education and ops.

Scout and cadet practice

Encode study phrases and decode practice copy for flag-semaphore drills and badge prep without a paper position chart.

Puzzles and classroom demos

Generate deterministic semaphore clues for escape rooms, CTFs, and live lessons with a shared word-separator rule.

What does the flag semaphore translator cost?

It is free in your browser on this page.

What characters are supported?

Letters A–Z (case-insensitive on encode) and digits 0–9. Digits share the classic dual-use poses (1 with A through 9 with I, and 0 with K).

How are words and positions written?

Each letter is L:POS+R:POS with positions DOWN, LOW, OUT, HIGH, UP, ACROSS_LOW, or ACROSS_HIGH. Letters are separated by a single space. Words are separated by space-slash-space ( / ).

Is the result deterministic?

Yes. The same text and mode always produce the same result with no network, randomness, or date-dependent behavior.

How are numbers signalled in flag semaphore?

The digits 0 to 9 share their positions with some letters on the classic chart. When encoding, each digit gets its pose; when decoding a pose that works for both, the tool gives you the letter.

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/semaphore

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/semaphore \
  -H "Authorization: Bearer $KIT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"text":"HELLO"}'
{
  "text": "HELLO"
}
{
  "task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
  "type": "enc.semaphore",
  "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.

The engine never calls a network, never samples randomness, and never depends on the calendar clock, so the same input and mode always produce the same result in the browser and through the API. Typical checks include encoding HELLO to five position tokens, decoding that string back to HELLO, and rejecting unsupported symbols with invalid_input. Use it free on this page for scout practice, naval history demos, and puzzle design, or call the API at $0.002 per successful request when you need reproducible semaphore transforms in CI and backend services.

What flag semaphore is and what this tool returns

The JSON response always includes result for the transformed string, mode echoing encode or decode, encoding fixed to flag_semaphore, and input_length plus output_length so automated tests can assert sizes without re-parsing the payload. There is no silent skip of unknown characters and no private extension table: either every symbol maps cleanly or the request fails with invalid_input.

How text and mode are read and how results stay reproducible

Encode trims outer whitespace for word splitting, treats internal whitespace runs as word separators, and rejects any character that is not A–Z or 0–9 with a message that names the bad symbol. Decode rejects tokens that cannot be normalized to a left and right position pair, rejects unknown pose names outside the seven allowed labels, and rejects position pairs that do not appear in the reverse table, again naming the undecodable token. The preferred payload field is text, with aliases input, value, s, and message so forms, query strings, and SDK clients can reuse the same contract without renaming columns. Mode defaults to encode and accepts decode explicitly; aliases op, direction, and action map to the same switch for scripts that already use those names. Because every branch is pure table lookup and string assembly, two clients with the same text and mode receive byte-identical results across Worker versions as long as the alphabet stays fixed. Pair the free browser run on this page with the priced API when you need the identical mathematical result inside an automated pipeline without re-implementing flag charts yourself. Invalid inputs return invalid_input and are not charged, which keeps exploratory validation cheap while successful transforms remain a fixed item price at $0.002 for API callers who integrate the same contract into quizzes, game engines, and documentation generators.

Where a flag-semaphore translator fits in learning, heritage, and tests

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 whiteboard demo to an automated pipeline without changing the encoded result.

CI and golden fixtures

Assert encode and decode pairs in automated tests so position names and separators never drift silently.

What modes are supported?

mode=encode (default) turns plain text into L:POS+R:POS tokens. mode=decode turns a position string back into text.

Read the full KIT documentation →