Base64 編碼解碼工具
在本機轉換文字、Base64、Base64URL、圖片 data URL、JSON payload 與 JWT segment,並在複製前檢查結構。
只在瀏覽器裡處理輸入的內容不會送到伺服器。
輸入與結果
輸入的內容只存在這個瀏覽器。重新開啟可以還原上次的操作。
使用情境
- 在本機轉換文字、Base64、Base64URL、圖片 data URL、JSON payload 與 JWT segment,並在複製前檢查結構。
- 以瀏覽器本機方式處理輸入,並在複製前檢查結果。
- 搭配 Base64 編碼解碼工具 與相關工具縮短工作流程。
範例
- 常見輸入
hello world- 用此範例檢查 Base64 編碼解碼工具 的輸入流程。
- 典型輸出
aGVsbG8gd29ybGQ=- 複製前用來確認結果格式與後續檢查點。
- 附加範例
eyJzdGF0dXMiOiJvayIsInNjb3BlIjoicmVhZCJ9- 複製前用來確認結果格式與後續檢查點。
- 附加範例
data:image/png;base64,iVBORw0KGgo=- 複製前用來確認結果格式與後續檢查點。
常見錯誤
- 在本機轉換文字、Base64、Base64URL、圖片 data URL、JSON payload 與 JWT segment,並在複製前檢查結構。
- 如果瀏覽器本機處理方式和真實輸入結構不一致, 輸出不能直接信任。
- 複製的值中如果混入正式密鑰、客戶資料或內部 URL, 分享前必須移除。
複製前確認
- 1再次比較原始輸入與輸出形態。
- 2確認目標執行環境、編碼、時區與安全政策差異。
- 3繼續用相關工具檢查 Base64 編碼解碼工具 的結果是否適合下一步。
參考資料
Standard Base64 and URL-safe Base64 use different alphabets
RFC 4648 uses + and / for the 62nd and 63rd characters, while base64url uses - and _. Put standard Base64 in a URL, cookie or path and / reads as a path separator and + as a space.
依據:RFC 4648
JWT segments have no = padding
JWS defines BASE64URL as base64url with all padding removed (RFC 7515). Feed a JWT segment to a standard Base64 decoder and it fails because the length is not a multiple of four.
依據:RFC 7515
RFC 4648 defines Base64 as a data encoding - anyone can reverse it, no key involved. Wrapping a token or a secret in Base64 hides nothing; it only adds a step.
依據:RFC 4648
常見問題
Base64 編碼解碼工具 的輸入在哪裡處理?
可行的處理會在瀏覽器中執行,但不要輸入正式密鑰或客戶資料。
結果可以直接用於正式環境嗎?
複製前請再次確認執行環境、編碼、時區與安全政策等環境差異。