LocalExcelTool
はじめる

テキスト暗号化

キーを決めて文章を暗号化・復号。ブラウザ内で完結する軽量な方法。

テキスト暗号化とは

テキスト暗号化とは、鍵を使って文章を読めない形に変換する処理です。本ツールはXORとBase64による可逆な軽量暗号で、同じキーなら元の文章に戻せます。

🔒 処理はすべてブラウザ内で完結し、データは送信されません。

このツールの前提

処理場所
このページのブラウザ内(JavaScript / Canvas)
アップロード
なし — ファイルは端末の外に出ません
オフライン
ページを開いた後は通信不要

What this actually computes, stated plainly

The text is converted to UTF-8 bytes and XORed with the key bytes, repeating the key as needed; the result is Base64-encoded. Decryption reverses it. It is a stream cipher in shape, but with the key used directly and reused, so it is obfuscation rather than encryption.

That distinction matters because XOR with a repeated key is breakable. If any part of the plaintext is known or guessable — a header, a common word, a fixed prefix — the corresponding key bytes fall out immediately, and from a short key the rest of the message follows. Reusing the same key on two messages makes it worse.

When it is the right tool anyway

Hiding a value from a casual reader: a spoiler in a shared document, a puzzle answer, a joke in a chat, a field that should not be readable at a glance. For those, a short shared key and a reversible transform is exactly what is wanted, and a real encryption library would be overkill.

It is the wrong tool for passwords, API keys, personal data, or anything that would be costly if read. Those need AES-GCM through Web Crypto, with a key derived from a passphrase by PBKDF2 or Argon2 and a random IV per message. The difference is that AES-GCM is authenticated: tampering is detected rather than silently producing garbage.

Why a wrong key sometimes "works"

Decryption XORs back and then decodes as strict UTF-8. A wrong key usually produces invalid sequences and this page reports a failure — but about one guess in several dozen can produce bytes that happen to be valid UTF-8, yielding mojibake instead of an error. If the output looks like text but is nonsense, the key was wrong, not the message.

The ciphertext is Base64, so any transport that mangles Base64 — a URL query string treating + as a space, a chat app wrapping long lines — will corrupt it before decryption is even attempted. That failure is indistinguishable from a wrong key, so check the ciphertext length against the original before assuming the key is at fault.

使い方

  1. 1.文章とキーを入力
  2. 2.暗号化または復号を選択
  3. 3.結果をコピー

他の方法との比較

同じ変換をする方法は 3 つあります。ブラウザ内(このページ)、サーバー側の変換サービス、デスクトップアプリ。差がつくのは速度ではなく、ファイルがどこへ行くかと、無料でどこまでできるかです。

観点このツールサーバー側の変換サービス
ファイルの処理場所このページのブラウザ内ベンダーのサーバー(アップロード後)
アカウント不要多くの場合必要(無料枠の制限解除に登録を求める)
無料で扱えるサイズサイズ制限なし(回数制限もなし)数ファイル/時間、または 5〜10MB 程度で課金 wall
料金無料。Pro は月 $9(大きいファイルと AI 機能のみ)サブスクが一般的。おおむね月 $7〜15(2026 年 11 月時点)
オフライン一度開けば通信不要不可
20MB を処理し始めるまで待ち時間なし(アップロードが無い)アップロードが支配的(10Mbps 上りで約 16 秒)
保証できないこと何も保存されないため、閉じたタブの内容は復元できません同じ(変換の原理は変わらない)

サーバー側のサービスが優れている点は明確にあります。巨大なファイル、チームでの共有、変換履歴の管理、スクリプトからの自動化。逆に「1 回だけ、手元のファイルを別形式にしたい」という今回の用途では、アップロードの待ち時間と登録の手間だけが増えます。

よくある質問

強度はどのくらいですか?

XORとBase64による軽量な難読化です。機密情報の長期保存には向きません。

キーを忘れたらどうなりますか?

復号できません。キーは必ず控えておいてください。

データは送信されますか?

いいえ。鍵も文章もブラウザの外に出ません。

この変換で失われるもの

テキストツールはページ外に出ません。貼り付けた文字列はメモリ上で変換され、結果欄に書き戻されます。リクエストもログも保持もないため、タブを閉じた値を復元する方法もありません。

その他のテキスト処理