跳到內文

STEMSTUDIO

Encode or decode Base64

Text & files · converted on this device

Encode or decode Base64

Drop a file to get its Base64 (or data URL), or convert text and pasted Base64.

  • Free, no account
  • Nothing is uploaded

Help

Three bytes are cut into four six-bit numbers, each written as its place in this table. "=" is not data — it pads the length out to a multiple of four. The form used inside URLs, filenames and JWTs. Decoding accepts either form automatically. The form you can paste straight into HTML or CSS. Data URLs are defined with the standard +/ alphabet, so URL-safe substitution is not applied here.

Processing, communication and stored data

輸入時即可雙向轉換文字,把檔案轉成 Base64 或 data URL,也能把貼上的 Base64 還原成檔案儲存。非 ASCII 字元完整保留,無法解碼時會告訴你哪一行的哪個字元有問題。

常見問題

表情符號和非拉丁文字能保留嗎?

能——一切都按 UTF-8 編碼,往返無損。如果對方系統假定了別的編碼,那是另一個問題,這裡無法解決。

我的 Base64 裡有換行

原樣貼上即可。解碼時會忽略換行、空格和製表符。大多數郵件傳輸按 76 列換行,這是正常的,不是損壞。

能處理多大的檔案?

25 MB。轉換時原始位元組、中間字串和 Base64 會同時存在於記憶體中,上限就是為此設的。很長的輸出不會顯示在頁面上以保持流暢,但複製和儲存仍作用於完整資料。

會上傳什麼嗎?

不會。一切在頁面中執行,關閉標籤頁就消失。但請記住 Base64 不是加密,無論把結果貼上到哪裡,都要當作原文可被讀取。

能用它讀取 JWT 嗎?

貼上用點分隔的第二部分,就能得到載荷 JSON;URL 安全字母表和缺少的填充都能處理。它不驗證簽名,所以內容能讀,但無法確認真偽。

Ratings from users

Ratings appear once there are 10.

Report a problem or suggest something

The tool name, this page’s path and your browser type are sent with it. Files are never sent. For a reply, use the email on the Contact page.