XOR Encryption Online on iPhone applies a repeating-key XOR transform to UTF-8 bytes in your browser and displays the resulting ciphertext as both hexadecimal and Base64. It supports harmless puzzles, education, interoperability checks, and capture-the-flag exercises, while the page does not upload the message, key, or output.
The sender and recipient must agree on the exact key text and the ciphertext representation. Repeating-key XOR is reversible, but it is not modern encryption and cannot protect sensitive information from someone who can analyze or modify the ciphertext.

Encrypt and decrypt on an iPhone
Complete the exchange through the iPhone browser with this workflow:
- Open XOR Encryption Online in your iPhone browser. The page performs the conversion locally, so the plaintext, key, and resulting output do not need to be uploaded.
- To create a new message, select Encrypt. Enter the plaintext exactly as it should appear after recovery, including capitalization, punctuation, line breaks, and spaces.
- Enter the exact repeating key in the key field. The key is treated as text, so its capitalization, spaces, punctuation, and Unicode characters affect the result.
- Run the local XOR transform. The page converts both the plaintext and key to UTF-8 bytes, combines corresponding bytes with XOR, and restarts the key when the plaintext is longer than the key.
- Review the primary output. The same ciphertext bytes are available as lowercase hexadecimal and standard padded Base64; changing the display format does not change the underlying XOR result.
- Copy the hexadecimal or Base64 result and tell the recipient which representation you used. This detail matters because the recipient must select the matching input format during decryption.
- On the recipient’s iPhone, select Decrypt, choose the same representation, paste the ciphertext, and enter the identical key, including its case and spaces.
- Run the decryption. The parsed ciphertext is XORed with the UTF-8 key and then decoded with strict UTF-8 validation. A successful result returns the original text; an invalid result or format error means you should check the format, key, and transported ciphertext.
The plaintext and key data are limited to 100,000 bytes, and an empty plaintext or empty key is rejected. Whitespace within plaintext is significant because it becomes part of the input bytes.
Pick the ciphertext format that fits
Hex and Base64 are two encodings of the same XOR output. Choose the representation required by the receiving system or the easiest format to transfer without alteration.
| Representation | Defined format | Practical choice |
|---|---|---|
| Hexadecimal | Two lowercase hexadecimal digits represent each byte. Decryption accepts complete byte pairs made only from hexadecimal digits; whitespace is ignored. | Useful when you want to inspect individual bytes or the recipient expects a hex string. |
| Base64 | Standard Base64 alphabet with correct padding. Decryption parses the selected representation strictly rather than guessing. | Usually shorter and convenient for carrying the ciphertext through ordinary text fields. |
Neither format provides extra protection. Hex and Base64 merely transport the same XOR ciphertext, so the recipient must reproduce both the byte-level convention and the exact key. Whitespace inside encoded ciphertext is ignored for convenient line wrapping, but the tool performs no other cleanup, normalization, or format guessing.
Understand the UTF-8 byte convention
The operation works on bytes rather than visible characters. Both the plaintext and key are encoded as UTF-8. If the plaintext byte is P[i], the key byte is K[i], and the UTF-8 key length is L, the result follows this rule: C[i] = P[i] XOR K[i mod L].
That rule means the key begins again whenever the plaintext continues beyond the key’s byte length. The implementation uses MDN’s TextEncoder reference for UTF-8 conversion and the standard bitwise XOR operator. Reproducing the same result elsewhere requires the same UTF-8 input encoding, byte-based operation, and key-repetition rule.
The key field never interprets its contents as hexadecimal. For example, the word key uses the UTF-8 bytes 6B 65 79. Entering 6B6579 instead would use those six visible characters as the key, producing a different result. This distinction explains why a command-line program or programming library may produce different ciphertext when it treats the key as raw hex or works with a different character unit.
Unicode text also consumes multiple key positions when its UTF-8 representation takes multiple bytes. Emoji and many non-Latin scripts can therefore advance the repeating key more than once per visible character. This page XORs UTF-8 bytes, not JavaScript UTF-16 code units and not user-perceived grapheme clusters.
Exchange the ciphertext without changing it
A reproducible exchange depends on preserving three things: the selected representation, the exact key text, and the ciphertext bytes. The sender can use either output because both forms contain the same underlying result.
- Tell the recipient whether you copied hexadecimal or Base64 before they attempt decryption.
- Preserve key capitalization and internal spaces. Do not substitute a visually similar character without checking it against the original key.
- Paste the complete ciphertext. Empty inputs and malformed encoded text are rejected rather than silently repaired.
- If decoding fails, compare the key character by character and confirm that the transport did not trim, rewrite, or replace the ciphertext.
- When the output is important, have the recipient confirm the meaningful plaintext through an independent channel.
This process is appropriate for a harmless message where both parties already know the key and need a deterministic, reversible transformation. It is not a secure messaging workflow because the repeated key can be analyzed and the ciphertext can be altered without detection.
Interpret errors and wrong keys
Hexadecimal input must contain complete byte pairs and only hexadecimal digits, although whitespace is allowed for wrapping. Base64 input must use the standard alphabet with correct padding. The decoder does not silently reinterpret malformed input as a different format, which helps reveal a copied or truncated value.
A wrong key commonly produces bytes that are not valid UTF-8, so the page displays an error instead of inserting silent replacement characters. However, a successful UTF-8 decode does not prove that the key was correct. Some incorrect byte sequences still form valid characters, particularly with short ASCII messages. Check that the recovered text is meaningful, and confirm it independently when correctness matters.
The distinction between a decoding error and a successful result is important. A visible error tells you that the bytes could not be decoded under the selected convention, while readable output tells you only that the resulting bytes formed valid UTF-8.
Know the security and size boundaries
Repeating-key XOR exposes patterns because the same key bytes recur. Known plaintext can reveal key bytes, short keys are especially weak, and an attacker may modify ciphertext without the tool detecting the change. The product provides no checksum, authentication tag, salt, nonce, password stretching, or key-management system.
Do not use this page for passwords, personal records, payment details, private keys, or any other information where confidentiality or integrity matters. For real security, choose a reviewed authenticated-encryption system and an application that handles keys safely. The “encryption” label describes the reversible XOR transform; it should not be read as a guarantee of modern data protection.
For compatible educational or puzzle traffic, the browser-only workflow remains practical. Keep the plaintext and key within the 100,000-byte limit, select the same format on both iPhones, preserve the exact key, and verify meaningful output. This makes the tool suitable for controlled experiments and interoperability work without implying protection that repeating-key XOR cannot provide.
If you're weighing options, AES Encryption Online Step by Step: Text Guide covers this in detail.
If you're weighing options, HMAC Generator on iPhone: Create Tags Locally covers this in detail.