T

Text Machine

Powerful text tools, in your browser

Pollux Cipher

Encode and decode the Pollux cipher. The message is first written in Morse with a single x between letters and a double x between words, and then every dot, dash, and separator is replaced by one of the digits from zero to nine that you assign to it. Because several digits can stand for the same symbol, the same letter is written differently each time. Follow the live letters-to-Morse-to-digit working, and copy, download, or share the result. Everything runs in your browser.

Key

Key

The key sets what each digit 0-9 stands for. Type ten symbols, one for each digit in order from 0 to 9, using a dot (.), a dash (-), or an x for the separator. The key must include at least one of each so every symbol has a digit. The example x...x--xxx makes 0, 4, 7, 8 and 9 separators, 1, 2 and 3 dots, and 5 and 6 dashes. Anything unusable falls back to this default, and both sides must use the same key.

Plain text
Cipher digits

Enter text above to see the result here.

Key table (symbol → digits)

Symbol

Digits

Dot

1
2
3

Dash

5
6

×

Separator (x)

0
4
7
8
9

How to use Pollux Cipher

  1. 1

    Choose encode or decode

    Pick Encode to turn plain text into Pollux cipher digits, or Decode to turn cipher digits back into plain text.

  2. 2

    Set the key

    Type ten symbols, one for each digit 0 to 9, using a dot, a dash, or an x for the separator. Make sure all three symbols appear so every symbol has a digit, and use the same key on both sides.

  3. 3

    Type or paste your text

    Enter your message and it is converted as you type. When encoding, the steps panel shows each letter over its Morse, then the whole stream symbol by symbol with the digit under each.

  4. 4

    Read the key table

    Open the key table to see which digits stand for the dot, the dash, and the separator under your current key.

  5. 5

    Copy, download, or share

    Copy the result, download it as a text file, or share a link that reopens the tool with your exact text and key ready to go.

Understanding the Pollux Cipher

What is the Pollux cipher?

The Pollux cipher hides a message inside an innocent-looking run of the digits 0 to 9. It works by first turning the text into Morse code and then disguising the Morse: every dot, every dash, and every separator is replaced by a number. Because the finished message is nothing but digits, it gives no obvious sign that Morse code is hiding underneath, which is exactly what makes it a favourite in puzzle hunts, escape rooms, and capture-the-flag and Science Olympiad CodeBusters challenges.

Pollux belongs to the same small family of Morse-based pencil-and-paper ciphers as Fractionated Morse and Morbit, all of them catalogued and kept alive by the American Cryptogram Association. What sets Pollux apart is its clever use of more digits than symbols: there are only three Morse symbols but ten digits, so each symbol is given several digits to hide behind. That one idea is the whole trick, and it is what flattens the letter frequencies a codebreaker would otherwise lean on.

Three symbols, ten digits

Once a message is written in Morse it uses only three symbols: the dot, the dash, and a separator, written here as x — a single x between letters and a double xx between words. To encipher it, you decide which of the digits 0 to 9 will stand for a dot, which for a dash, and which for the separator. There is no fixed rule; the only requirement is that each of the three symbols gets at least one digit, so that nothing is left without a number and decoding stays possible.

With ten digits to share among three symbols, most symbols end up with two, three, or more digits to choose from. When you reach a dot in the stream you may write any of the digits assigned to the dot. That freedom is the heart of Pollux: the letter E, a single dot, might be a 1 in one place and a 3 in another, so an attacker counting how often each digit appears learns almost nothing about which letters are common.

Choosing among the digits

Because a single symbol can map to several digits, the person encrypting must pick one each time. Traditionally the choice is made at random, so the very same message enciphered twice produces two different strings of numbers — a useful property that further frustrates analysis.

An online tool, though, has to be repeatable: type the same text with the same key and you should always get the same result, and a shared link must reopen exactly what you saw. This tool keeps the variety without the randomness by cycling through each symbol's digits in turn. If the dot is assigned 1, 2, and 3, then the first dot becomes 1, the next 2, the next 3, then back to 1, and so on. The output still spreads across all the available digits, but it is now reproducible — and decoding never depends on which digit was chosen, because every digit maps back to exactly one symbol.

How the Pollux cipher works

Encoding runs in two moves. First, write the whole message in Morse, putting one x between letters and two between words. Second, walk through that dot-dash-x stream one symbol at a time and replace each symbol with one of the digits you assigned to it. There is no padding and no grouping to worry about: every symbol simply becomes a single digit, so a stream of twenty symbols becomes exactly twenty digits.

The steps panel above shows this live. The top row pairs each letter with its Morse code, and the bottom row lays out the full stream symbol by symbol with the digit each one became underneath. Watch a repeated letter and you will see it take different digits, the visible proof of how Pollux scatters its numbers. The key table beneath shows, for the current key, exactly which digits belong to the dot, the dash, and the separator.

A worked example

Take the distress call SOS with the key x...x--xxx, which makes 1, 2 and 3 dots, 5 and 6 dashes, and 0, 4, 7, 8 and 9 separators. In Morse, SOS is dot-dot-dot for S, dash-dash-dash for O, and dot-dot-dot again for S, joined by single separators into the eleven-symbol stream dot dot dot x dash dash dash x dot dot dot.

Now replace each symbol, cycling through its digits. The first three dots take 1, 2, and 3; the first separator takes 0; the three dashes take 5, 6, and 5 (the dash has only two digits, so it cycles back); the next separator takes 4; and the last three dots take 1, 2, and 3 again. The result is 12305654123. Decoding reverses it: each digit becomes its symbol — 1, 2, 3 are dots, 0 and 4 are separators, 5 and 6 are dashes — rebuilding dot dot dot x dash dash dash x dot dot dot, which reads back through the Morse table as SOS.

Decoding a Pollux message

Decoding is wonderfully direct because there is no ambiguity: each digit stands for exactly one symbol. Look up every digit in the key to turn the number string back into dots, dashes, and separators, join them into one long stream, then split it on the separators — a single x ends a letter and a double xx ends a word — and read each run of dots and dashes back through the Morse table to recover the text.

To decode correctly you must use the same key that was used to encode; a different key maps the digits to the wrong symbols and the Morse comes out as nonsense. Because only letters and digits have Morse codes, any punctuation or other symbols in the original message were dropped during encoding and will not return, and a contraction such as "it's" comes back as the single word ITS. Spaces between groups of cipher digits are ignored on decode, so it makes no difference whether the cipher text was written solid or in tidy blocks of five.

History, uses, and security

Pollux is one of a handful of Morse-based ciphers — alongside Fractionated Morse and Morbit — collected for recreational cryptanalysis by the American Cryptogram Association, and it has found a second life in school competitions such as Science Olympiad CodeBusters, where students learn to recover the key from the patterns the Morse leaves behind. The trick of using more cipher symbols than plaintext symbols, so that several stand for one, is a small but elegant lesson in how to defeat frequency counting.

By modern standards Pollux is not secure. Spreading each symbol across several digits defeats naive frequency analysis, but the underlying Morse imposes strong, well-known patterns — no three separators ever appear in a row, certain short codes are very common — and a known or guessed key, or simply enough cipher text, lets a determined solver or a computer recover the message. Treat Pollux as a puzzle and a teaching tool, a vivid demonstration of how disguising one code with another raises the bar, and never as a way to protect real secrets. For genuine confidentiality, always use a modern, peer-reviewed algorithm such as AES.

Frequently asked questions

What is the Pollux cipher?
It is a hand cipher that hides Morse code inside a string of the digits 0 to 9. The message is written in Morse with x separating letters and xx separating words, then every dot, dash, and separator is replaced by one of the digits you assign to it. Because each symbol can have several digits, the cipher text uses all ten digits and the same letter rarely looks the same twice.
How does the Pollux key work?
The key decides which digits stand for a dot, which for a dash, and which for the separator. You assign all ten digits 0 to 9 among the three symbols, with at least one digit for each. In this tool you type ten symbols in order for digits 0 to 9 — for example x...x--xxx makes 0, 4, 7, 8 and 9 separators, 1, 2 and 3 dots, and 5 and 6 dashes.
Why can several digits mean the same symbol?
There are only three Morse symbols but ten digits, so the extra digits are shared out among the symbols. Giving each symbol more than one digit is the whole point of Pollux: it lets a common letter be written different ways, which flattens the digit frequencies and defeats the simple counting attacks that break a plain substitution cipher.
Why does the same text give the same digits here?
The traditional cipher chooses a digit at random whenever a symbol has more than one, so each encryption differs. A web tool has to be reproducible, so this tool instead cycles through each symbol's digits in turn — first 1, then 2, then 3, then back to 1, for instance. The output still uses all the assigned digits, and because every digit maps back to one symbol, decoding is unaffected.
Can you show a worked example?
With the key x...x--xxx, the word SOS becomes the digits 12305654123. SOS is dot-dot-dot x dash-dash-dash x dot-dot-dot in Morse; cycling each symbol through its digits gives 1, 2, 3 for the dots, 0 for the separator, 5, 6, 5 for the dashes, 4 for the next separator, and 1, 2, 3 for the final dots.
How do I decode a Pollux message?
Reverse the steps: look up each digit in the key to get its single Morse symbol, join them into one dot-dash-x string, split it on the separators (single x between letters, double xx between words), and read each run of dots and dashes back through the Morse table. In this tool, choose Decode and enter the same key that was used to encode.
Does it handle numbers and punctuation?
Letters and digits are encoded, because both have standard Morse codes. Punctuation and other symbols are dropped, and any run of spaces becomes a single word break. This means a contraction like "it's" is treated as the single word ITS, which matches the common reference implementations of the cipher.
What if my key is invalid?
A key must resolve to exactly ten symbols and use all three of dot, dash, and separator. If it does not — too few or too many symbols, or a missing symbol — the tool falls back to the default key x...x--xxx so the page keeps working. The key table always shows the key actually in use, which is your confirmation that a typed key was accepted.
How is Pollux different from Morbit and Fractionated Morse?
All three write the message in Morse first. Pollux replaces each single symbol with one digit, sharing the ten digits among the three symbols. Morbit reads the stream two symbols at a time and outputs the digits 1 to 9, while Fractionated Morse reads it three symbols at a time and outputs letters A to Z. So Pollux and Morbit both produce numbers but in different ways, and Fractionated Morse produces letters.
Is the Pollux cipher secure?
No. Sharing each symbol across several digits defeats simple frequency counting, but the underlying Morse leaves strong statistical patterns, and the cipher falls to classical solving methods and to computers, especially when the key is guessed or reused or when plenty of cipher text is available. It is excellent for puzzles and learning, but for real protection use a modern algorithm such as AES.
Is my text uploaded to a server?
No. All encoding and decoding happens entirely in your browser, so your text is never uploaded, logged, or stored. Even a share link keeps your text and key in the part of the URL after the # symbol, which browsers never send to a server, so your message stays private until you choose to share the link.

Related tools

Keep going with these handy tools

Fractionated Morse Cipher

Morbit Cipher

Morse Code Translator

Caesar Cipher

Vigenère Cipher

Atbash Cipher