Skip to content
UniKit

Simple text encryption

Encrypt and decrypt text with five classical ciphers — Caesar shift, Vigenère, rail fence, Atbash and XOR + Base64 — each with its matching decryption. All of them are toy algorithms and unsuitable for real secrecy.

Runs in your browserEvery computation happens in your browser — your data never leaves this device.

Input

Text to process

Cipher and parameters

Everything is computed locally in the browser; the page makes no requests.

Direction
3

Result

Type some text to see the result.

What this tool does

  • Teach classical cryptography in one page: start with the Caesar shift to show alphabet substitution, then Vigenère to show why a key defeats frequency analysis.
  • Build puzzle or escape-room material: scramble a hint with the rail fence cipher and let players verify their answer with the same tool.
  • Wrap fun copy in Atbash or XOR + Base64 so an answer is not readable at a glance.
  • Practise side by side: run the same plaintext through all five ciphers and compare the output shapes (letters, letters, letters, letters, Base64).

Example

Input

Hello, World! (Caesar shift, encrypt, shift 3)

Output

Khoor, Zruog!

Switch the direction to Decrypt, keep the shift at 3, and Khoor, Zruog! returns to Hello, World!. Vigenère with the key LEMON turns ATTACKATDAWN into LXFOPVEFRNHR — the textbook test vector.

Frequently asked questions

Can I protect real data with these ciphers?

No. All five are classical ciphers or toy transforms: a Caesar shift has only 25 possibilities, Vigenère falls to frequency analysis given enough ciphertext, and Atbash and XOR + Base64 are barely more than plaintext. Treat this tool as teaching material, and use AES-GCM or similar for actual confidentiality.

Why do digits in a Vigenère key not affect the result?

Vigenère defines shifts only for letters, so digits, spaces and punctuation in the key are ignored and only letters take effect. Non-letters in the ciphertext are preserved too and do not consume key positions. The key must contain at least one letter, otherwise the tool reports an error.

How many rails should I use for the rail fence?

Between 2 and 10. More rails chop the text into smaller pieces, but the cipher only permutes characters without changing them, so frequency analysis breaks it quickly regardless.

What are the key requirements for XOR + Base64?

The key must contain at least one letter and can be any length; encryption XORs every byte with the repeating key and then Base64-encodes the result, so the output is a Base64 string. With the wrong key the decrypted bytes are usually not valid UTF-8 and the tool says the key is wrong.

Why is there no separate Atbash decryption?

Atbash is an alphabet mirror: a↔z, b↔y, every letter maps to its opposite position, so applying it twice returns the original text. It is self-inverse, which is why both directions produce exactly the same output.

Keywords:caesar ciphervigenere cipherrail fence cipheratbashxor base64classical cipher凯撒密码维吉尼亚密码栅栏密码古典密码在线加密解密

Related tools