Free Tool
Text Encryption Demonstrator
Encryption turns readable text into unreadable text that only the right key can turn back. Type a message below, choose a key, and watch it scramble — then change the key by one number and see how the result changes completely. This demonstrator uses a simple shift cipher to make the idea visible; it is a teaching tool, not real security.
Demonstration only — this cipher is a toy. The shift cipher used here can be broken by trying all 25 shifts, and anything it scrambles can be read by anyone. It shows how encryption works in outline, not how real encryption protects a message.
What this tool does
Encryption is the process of turning plaintext — a readable message — into ciphertext: text that looks like noise, and that can only be turned back into the message by someone with the key. The key is the secret that makes the difference between the two. Without the key, the ciphertext is unreadable; with it, the message returns exactly. That is the whole idea, and it is the idea behind everything from messaging apps to online banking.
This demonstrator makes the idea visible with the simplest cipher there is: a shift cipher, where each letter moves a fixed number of places through the alphabet, chosen by you as the key. Type a message, pick a key from 1 to 25, and the text scrambles. Change the key by one, and the scrambled text changes completely. Use the wrong key to decrypt, and you get gibberish back — which is the point: the key is what makes the difference between a message and noise.
The demonstrator is deliberately honest about its limits. A shift cipher has only 25 keys, so an attacker can try them all in seconds, and the Caesar cipher simulator on this site shows that attack in full. Real encryption works the same way in outline — a key, an encryption step, a decryption step — but with a key space so large that trying every key is not feasible, and with mathematics that resist shortcuts. The encryption guides linked below explain the real thing: symmetric and asymmetric encryption, and why the key, not the algorithm, is the secret.
Try it
Type a message, choose a key (the shift), and encrypt it. Then try decrypting with the wrong key to see what happens.
Waiting. Press Encrypt my message. Remember: this cipher is a toy.
How it works
The demonstrator encrypts by shifting each letter forward by the key: with a key of 7, A becomes H, B becomes I, and Z wraps around to G. Upper-case and lower-case letters shift separately, so the shape of the message is preserved, and spaces, numbers and punctuation are left untouched — exactly as the historical Caesar cipher worked. Decryption shifts each letter backwards by the same amount, and only that amount returns the original message.
The key is doing all the work. The algorithm — shift each letter — is public and known to everyone, including any attacker. What the attacker does not know is the key, and that is the only secret in the system. With the right key, the message is there; with the wrong key, the result is gibberish; with no key at all, the attacker must try all 25 possibilities, which is why a 25-key cipher is a toy and a modern cipher with billions of billions of keys is not.
That separation — public algorithm, secret key — is the central principle of modern cryptography, stated by the Dutch cryptographer Auguste Kerckhoffs in the nineteenth century and still true today: a system must remain secure even if the attacker knows everything about it except the key. The demonstrator makes the principle visible in miniature. The encryption guides on this site explain how modern systems put it into practice, with keys that are generated randomly, exchanged safely and never reused.
Limitations
This demonstrator uses a shift cipher, which is not secure. It can be broken by trying all 25 keys, by frequency analysis, or by guessing from the pattern of the message. Anything encrypted here can be read by anyone who tries, and it must never be used to protect a real message, a password, or any information that matters.
- The demonstrator shows encryption in outline only. It does not do key exchange, authentication, or any of the other pieces a real encrypted conversation needs — and those pieces are where real security usually fails.
- The result is deterministic: the same message and key always give the same ciphertext, which leaks information. Real encryption adds randomness so that the same message encrypts differently every time.
- Nothing you type is sent anywhere. The computation is local, and the page works offline once loaded.
Examples
Example 1 — Meet me at noon, key 7. Encrypting Meet me at noon with a key of 7 gives Tlla tl ha uvvu. Decrypting that with a key of 7 gives the message back. Decrypting it with a key of 6 gives gibberish — S kkz sk gz tuut, or something equally unreadable — which is the point: the key is the only thing that opens the message.
Example 2 — one key change, a different message. Encrypt the same message with a key of 8 instead of 7, and the result changes completely: every letter moves one place further. A key that is wrong by one is as wrong as a key that is wrong by twenty, because decryption needs the exact key, not an approximate one.
Example 3 — the same message, twice. Encrypt Meet me at noon with a key of 7, and then encrypt it again with the same key: you get the same ciphertext both times. Real encryption avoids that — it adds randomness so the same message looks different every time, because a repeated ciphertext leaks the fact that the message was repeated.
Frequently asked questions
What is encryption?
Turning readable text (plaintext) into unreadable text (ciphertext) that only the right key can turn back. It protects the contents of a message while it travels or while it is stored.
What is a key?
The secret that makes encryption work. The algorithm is public; the key is private. With the right key you can decrypt; without it, the ciphertext should be unreadable. Lose the key and you lose the message; share the key and you share the message.
Is this demonstrator's cipher real encryption?
No. It uses a shift cipher with 25 possible keys, which anyone can break by trying them all. It shows how encryption works in outline — a key, an encryption step, a decryption step — not how real encryption protects a message.
Why does encrypting the same message twice give the same result here?
Because this toy cipher has no randomness. Real encryption adds a random element so the same message encrypts differently every time — otherwise an attacker could tell when the same message was sent twice.
What is the difference between encryption and hashing?
Encryption is reversible with a key; hashing is one-way and produces a fingerprint for checking. You encrypt a message to send it privately; you hash a password to store it safely. The encryption-versus-hashing guide explains both in depth.