DEV NO.002
Base64 编解码
文本与 Base64 互转,正确处理中文等 UTF-8 字符。
此工具完全在本地运行,数据不会上传到任何服务器。
输入
输出
这是什么
什么是 Base64
Base64 将任意二进制数据表示为 64 个可打印字符,广泛用于邮件附件、Data URL、JWT 与 API 载荷。本工具支持编码与解码双向,并提供 URL 安全字母表切换。
What is Base64
Base64 represents arbitrary binary data as 64 printable characters. It appears in email attachments, data URLs, JWTs and API payloads. This tool handles both directions and offers a URL-safe alphabet toggle.
如何使用
- 粘贴文本,选择「编码」或「解码」方向。
- 需要 URL 安全模式时勾选开关(+ / → - _)。
- 复制输出结果。
How to use
- Paste text and pick Encode or Decode.
- Toggle URL-safe if the output will live in a URL ( + / become - _ ).
- Copy the result.
常见问题
为什么有些工具解码中文会乱码?
因为它们用 Latin-1 而不是 UTF-8 处理字节。本工具按 UTF-8 编解码,中文与 Emoji 都能正确还原。
Base64 是加密吗?
不是。Base64 只是编码方式,任何人都能解码,切勿用它保护敏感信息。
什么是 URL 安全的 Base64?
将 + 和 / 替换为 - 和 _,避免在 URL 与文件名中被转义,常见于 JWT。