DEADeveloper Engineering Atlas開發者工作台

本機 · 輸入內容不會上傳

Base64、URL 元件編碼與 SHA-256 工具

在瀏覽器中完成 Base64 編解碼、URL component 編碼與 SHA-256 摘要。

工作區

使用說明與技術參考

使用方式

選擇四種純瀏覽器操作之一:UTF-8 文字轉 Base64、Base64 還原 UTF-8 文字、以 encodeURIComponent 編碼 URL component,或計算 SHA-256。這些操作用途不同;Base64 與 URL encoding 不是加密,SHA-256 digest 也不能解密。

  1. 選擇 Base64 encode、Base64 decode、URL encode 或 SHA-256。
  2. 輸入文字;解碼模式則輸入標準 Base64。
  3. 把結果與預期格式核對後再複製到其它系統。
  4. 使用相對應的 decoder 或 verifier,不要把編碼當成存取控制。

範例

輸入
Base64 encode:hello
輸出
aGVsbG8=

hello 的 UTF-8 bytes 轉成標準 Base64。

輸入
Base64 encode:你好
輸出
5L2g5aW9

中文先轉 UTF-8 bytes;decode 後還原為你好。

輸入
URL encode:a b&c
輸出
a%20b%26c

encodeURIComponent 會編碼單一 URL component 中的空白與 ampersand。

輸入
SHA-256:abc
輸出
ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad

64 個十六進位字元表示 256-bit digest。

結果欄位解讀

Base64 encode 把 UTF-8 bytes 表示成可攜文字;Base64 decode 把有效標準 Base64 還原為 UTF-8。

URL encode 使用 encodeURIComponent,適合單一 query value 或 path component,也會編碼 slash。

SHA-256 產生固定且不可逆的摘要;相同 bytes 會有相同 hash,但 digest 不會隱藏低熵輸入。

全部操作在瀏覽器執行,輸入不會送到 DEA 伺服器。

常見錯誤與限制

  • Base64 不是加密;Base64url 的 alphabet 與 padding 規則也不同。
  • 不提供 URL decode、檔案 Base64、Base64url 或損壞輸入自動修復。
  • URL component encoding 不等於解析或安全重組完整 URL。
  • 一般 SHA-256 不是本工具提供的密碼儲存方案;密碼需使用專用 salted password hash。

常見問題

為什麼中文能做 Base64?
工具先把文字轉為 UTF-8 bytes,再使用 Base64 alphabet 表示。
Base64 與 Base64url 不同在哪?
Base64url 把 +、/ 改成 URL-safe 字元且常省略 padding;本頁只處理標準 Base64。
為什麼 URL 中的斜線也被編碼?
encodeURIComponent 把輸入視為單一 component,因此 / 是資料而非路徑分隔符,會變成 %2F。

← 回到全部工具