XOR encryption online on Mac applies a repeating-key exclusive OR transform to UTF-8 text in your browser, without uploading the message, key, or output.
It suits harmless puzzles, interoperability checks, and capture-the-flag exercises. The reversible transform is useful for demonstrating byte-level encoding, but it must not be mistaken for protection suitable for secrets.

Run the workflow in a Mac browser
The supported Mac workflow uses the web interface: open the page on the Mac, select the operation, enter the data, and run the transform in the browser. The page does not upload the message, key, or output.
- Open the XOR Encryption Online page in the browser on your Mac. The page performs the operation locally in that browser.
- Choose Encrypt, then enter the plaintext in the input field. Preserve spaces, tabs, and line breaks because plaintext whitespace is significant. Empty plaintext input and an empty key are rejected.
- Enter the repeating key in the separate key field as ordinary text. Preserve capitalization, punctuation, and any spaces. Plaintext and key data each have a 100,000-byte limit.
- Run the local XOR transform. The page encodes the plaintext and key as UTF-8 bytes, repeats the key as needed, and displays the resulting bytes in both lowercase hexadecimal and standard padded Base64.
- Copy the primary Hex or Base64 result you want to exchange, and tell the recipient which representation was selected. The two fields are alternative encodings of the same XOR bytes.
For a quick reference while copying values, the XOR Encryption Online Cheat Sheet: Formats and Keys summarizes the matching format and key conventions.
How XOR matches bytes on your Mac
Byte conventions explain why the same key can produce a different result in another command-line program or website. This implementation first converts both the plaintext and key to UTF-8. MDN's TextEncoder reference explains the browser API responsible for producing UTF-8 bytes from text.
The transform then combines each plaintext byte with the corresponding key byte. When the plaintext is longer than the key, the key starts again at its first byte. For byte position i, the operation is result[i] = plaintext[i] XOR key[i modulo key length]. Decryption applies the same operation to the parsed bytes before requiring valid UTF-8.
The key field is deliberately text rather than hexadecimal input. A key entered as key is encoded as bytes 6B 65 79; entering 6B6579 instead uses the six visible characters in that string. MDN's reference to JavaScript bitwise XOR explains the underlying exclusive OR operation.
Unicode affects byte positions even when it does not look different on screen. An emoji or many non-Latin characters can occupy several UTF-8 bytes, so they consume several positions in the repeating key. The implementation operates on bytes, not JavaScript UTF-16 code units or user-perceived grapheme clusters. This fixed convention makes matching results possible across standards-compliant browsers.
Choose between hexadecimal and Base64
Hex and Base64 do not change the underlying transform; they package the same resulting bytes for transport or inspection.
| Representation | Produced format | Practical use on Mac | Strict decryption rule |
|---|---|---|---|
| Hex | Lowercase hexadecimal with two digits per byte | Inspecting bytes or matching a receiver that expects hexadecimal | Only hexadecimal digits in complete byte pairs; whitespace is ignored |
| Base64 | Standard alphabet with correct padding | Carrying ciphertext through text fields when the receiver expects Base64 | Standard Base64 alphabet and correct padding; whitespace is ignored |
Hex is convenient when you need to inspect byte values or match a system that expects hexadecimal. Base64 is shorter and easier to carry through ordinary text fields. Switching the output format does not create a different ciphertext, so the selected representation still needs to be communicated to the recipient.
Decrypt and recover the original text
- Choose Decrypt in the tool on your Mac.
- Select Hex or Base64 to match the ciphertext you received.
- Paste the ciphertext into the input field and enter the identical key, including case and spaces.
- Run the decryption and check the recovered text. If the key is wrong, the tool will often show an invalid UTF-8 error rather than silently replacing bad bytes.
- Confirm that the recovered message makes sense through an independent channel before treating it as the intended plaintext.
Input parsing is strict. Hex must contain complete byte pairs and only hexadecimal digits, although whitespace is ignored. Base64 must use the standard alphabet with correct padding. No other cleanup or format guessing is performed. Once the bytes are parsed, the tool repeats the key, applies XOR, and performs fatal UTF-8 validation.
A successful UTF-8 decode does not prove that the key was correct. Some wrong byte sequences still form valid characters, especially with short ASCII messages. That is why a plausible-looking result still needs independent confirmation.
Fix mismatches after copying on macOS
When a value copied on macOS does not reproduce the expected result, compare the following in order rather than changing the key at random.
- Key characters: Use the exact key text, including capitalization, punctuation, leading or trailing spaces, and Unicode characters. A visually similar key may contain different bytes.
- Key notation: Do not paste hexadecimal bytes when the other side agreed on the visible key text. The field does not interpret 6B6579 as the three-byte key key.
- Representation: Match the decrypt format to what was sent. A Base64 string labeled as hex may be rejected or may parse as hex and yield different bytes, so match the decrypt format to what was sent. Malformed hex or Base64 is not repaired automatically.
- Transport: Confirm that the receiving app did not rewrite non-whitespace characters or remove required Base64 padding. Whitespace inside encoded ciphertext is ignored, but every meaningful character still matters.
- Unicode length: Count UTF-8 byte positions, not only visible characters, when checking how the key repeats across emoji or non-Latin text.
- Plaintext spacing: Keep intentional spaces and line breaks in the original message. They become bytes and affect the result.
If the tool reports an error, first compare the key's exact characters, then confirm that the representation and transport were not changed. If it returns text without an error, review whether the message is meaningful and verify it separately.
Understand the security limits before pasting data
Repeating-key XOR is reversible obfuscation, not modern encryption. A repeated key exposes patterns, known plaintext can reveal key bytes, and short keys are especially weak. Ciphertext can also be altered without the tool detecting the change.
The page does not add a checksum, authentication tag, salt, nonce, password stretching, or key-management system. A successful decrypt therefore confirms that the selected bytes could be decoded under the stated convention, not that the sender was authenticated or that the content was protected from modification.
Do not use this workflow for passwords, personal records, payment details, private keys, or any other information where confidentiality or integrity matters. Use a reviewed authenticated-encryption system for sensitive data. For education, interoperability tests, and capture-the-flag puzzles, keep the key agreement and format communication separate from the ciphertext exchange.
Local processing keeps the message, key, and output out of an upload workflow, but it does not turn repeating-key XOR into a secure cipher. On a Mac, use the browser tool for its declared reversible-transform purpose and select a vetted authenticated solution when the stakes require real security.
Related reading: AES Encryption Online Tips and Common Mistakes.