Base64 Encode Online
The most flexible Base64 encoder: encode plain text, any local file or a remote URL. You can pick the character set used for text, the Base64 standard (standard, MIME, URL-safe, PEM, IMAP and more) and the output format. Enable live mode to encode as you type.
如何使用「Base64 Encode Online」工具
- 選擇資料類型:文字、本機檔案或遠端網址。
- 若是文字,可選擇字元編碼(預設為 UTF-8,也是大多數系統預期的編碼)。
- 選擇 Base64 標準與輸出格式。
- 按下編碼為 Base64,然後複製或下載結果。
支援的 Base64 標準
- 標準(RFC 4648):字母表
A–Z a–z 0–9 + /,以=補齊。 - MIME(RFC 2045):相同字母表,每 76 個字元以 CRLF 換行。
- PEM(RFC 7468):每 64 個字元換行,用於憑證。
- Base64URL(RFC 4648 §5):以
-和_取代+和/,不補齊。用於 JWT 和網址。 - IMAP(RFC 3501):使用
+和,,不補齊。 - XML 名稱權杖(
.和-)及 XML 識別碼(_和:)。 - OpenPGP ASCII armor(RFC 4880):每行 76 個字元,另附 CRC-24 校驗碼。
為什麼字元集很重要?
Base64 編碼的是位元組,而不是字母。同一個字在 UTF-8、Windows-1252 或 Shift_JIS 中會產生不同的位元組,因此 Base64 字串也不同。除非接收端明確要求舊式編碼,否則請使用 UTF-8。
When developers encode to Base64
Use this free Base64 encoder to embed images in CSS/HTML data URIs, put binary blobs in JSON APIs, build HTTP Basic Auth headers, wrap PEM certificates, or produce URL-safe tokens. Prefer Base64URL for JWTs and query strings, and MIME wrapping when a mail client expects 76-character lines.
所有 Base64 編碼工具
- 文字轉 Base64
- 檔案轉 Base64
- 圖片轉 Base64
- PNG 轉 Base64
- JPG 轉 Base64
- GIF 轉 Base64
- BMP 轉 Base64
- ICO 轉 Base64
- SVG 轉 Base64
- WebP 轉 Base64
- AVIF 轉 Base64
- 音訊轉 Base64
- MP3 轉 Base64
- WAV 轉 Base64
- Ogg 轉 Base64
- FLAC 轉 Base64
- WMA 轉 Base64
- 影片轉 Base64
- PDF 轉 Base64
- Hex 轉 Base64
- HTML 轉 Base64
- CSS 轉 Base64
- JSON 轉 Base64
- 網址轉 Base64
所有 Base64 解碼工具
常見問題
如何將字串編碼為 Base64?
選擇「文字」,貼上字串,然後點擊「編碼為 Base64」。預設的 UTF-8 設定與 JavaScript、Python、PHP 和 Java 的結果一致。
可以將檔案編碼為 Base64 嗎?
可以。選擇「本機檔案」並挑選任何檔案:圖片、PDF、ZIP、憑證等。檔案在本機處理,絕不上傳。
Base64 和 Base64URL 有什麼不同?
Base64URL 以 "-" 取代 "+"、以 "_" 取代 "/",且通常省略補齊字元,因此結果可直接用於網址和檔名,不需跳脫。
Is this Base64 encoder free?
Yes. Encode unlimited text and files in your browser with no sign-up. Nothing you encode is uploaded to our servers.
How do I encode for e-mail (MIME)?
Select the MIME (RFC 2045) standard so the output is wrapped at 76 characters with CRLF, which is what many mail systems expect.
留言 (0)
對「Base64 Encode Online」有問題、想法或發現錯誤嗎?歡迎留言、為工具評分或回覆他人。
目前還沒有留言,歡迎搶先分享您的意見!