← 密碼和安全

密碼/安全工具

Base64 編碼/解碼

使用 Base64 或 Base64url 對 UTF-8 文字進行編碼或解碼。

在您的瀏覽器中執行

UTF-8 文字最多 1 MiB,或編碼輸入最多 1.4 MiB。 Base64url 接受未填充的輸入。編碼輸入中的 ASCII 空格和換行符將被忽略。

Base64是編碼,而不是加密。該工具轉換UTF-8文字;它不解碼任意二進位。無效的字母、填充和無效的 UTF-8 將被拒絕。

English guide · Ghid în română

Practical guide

Represent UTF-8 text as Base64 or decode an encoded text value. Base64 changes representation, not confidentiality: anyone with the value can reverse the encoding.

Steps that matter

  1. Choose encoding or decoding and select standard Base64 or Base64url.
  2. Paste the complete value without surrounding JSON quotes or a data-URL prefix.
  3. Process and inspect the result. If decoding fails, check the variant and whether the original bytes were actually UTF-8 text.

Worked example

The text Hello encodes to SGVsbG8= in standard Base64. In Base64url, padding can be omitted, giving SGVsbG8. Neither value hides the word from a recipient.

Check before using the result

  • Binary files are not always valid UTF-8 text. This text decoder rejects invalid UTF-8 instead of pretending it is readable content.
  • Do not use Base64 to protect passwords or personal data. Use the appropriate encryption and access controls for your application.