Base64编码/解码
文本与 Base64 互转,另支持文件转 Base64。
关于「Base64编码/解码」
它属于「编码加密」分类:常见编码、哈希与转义,全部在本地计算。
- 把文本编码为 Base64 或反向解码,采用 UTF-8 安全方案,中文不会乱码。
- 勾选「URL 安全」会把 + / = 替换为 - _ 并无填充,常用于 token、URL 参数。
- 处理在本地完成,内容不会上传。
完全免费、无需注册;所有处理都在浏览器本地完成,文件不会上传到任何服务器。
相关关键词:Base64编码/解码、编码加密、base64、编码、解码、在线工具、免费
如何使用「Base64编码/解码」
- 打开工具:打开「Base64编码/解码」页面,无需注册、无需安装任何软件。
- 准备输入:准备好要处理的内容或文件:文本可直接粘贴,文件可拖入页面(本工具属于「编码加密」)。
- 填入内容:把内容粘贴进输入框,或把文件拖入页面;也可以点击「示例」先填入样例数据试一下。
- 设置选项并处理:按需调整页面上的选项,然后点击处理 / 转换 / 生成按钮。
- 获取结果:处理完全在浏览器本地完成,结果可直接复制或下载,文件不会上传到任何服务器。
常见问题
- 为什么 Base64 比原文长?
- Base64 每 3 字节编码为 4 字符,体积约膨胀 33%,是编码特性。
- 解码出现乱码?
- 可能是源不是标准 Base64,或含换行/URL 字符未切换模式;试试勾选 URL 安全再解。
Base64 Encode/Decode (English)
Convert text to/from Base64, plus file to Base64.
Belongs to “Encoding & Crypto”: Common encodings, hashes and escaping — all computed locally.
- Encodes text to Base64 or decodes it back, using a UTF-8-safe scheme so Chinese never garbles.
- Check “URL-safe” to swap + / = for - _ with no padding — common for tokens and URL params.
- Processing is done locally; nothing is uploaded.
Free, no sign-up; everything runs locally in your browser and files are never uploaded.
Keywords: Base64 Encode/Decode, Encoding & Crypto, base64, encode, decode, online tool, free
How to use it
- Open the tool:Open the “Base64 Encode/Decode” page — no sign-up and nothing to install.
- Prepare the input:Prepare the content or file to process: paste text or drop a file onto the page (this tool belongs to “Encoding & Crypto”).
- Provide the input:Paste your content into the input box or drop a file onto the page; you can also click “Sample” to try example data first.
- Adjust options and run:Adjust the options if needed, then click the process / convert / generate button.
- Get the result:Everything runs locally in your browser; copy or download the result — your files are never uploaded.
FAQ
- Why is Base64 longer than the original?
- Base64 encodes 3 bytes into 4 chars, growing size ~33% — an inherent property of the encoding.
- Decode shows garbage?
- The source may not be standard Base64, or has newlines/URL chars without the right mode; try URL-safe and decode again.
More tools in Encoding & Crypto
- URL Encode/Decode — encodeURIComponent-level escaping and unescaping.
- HTML Escape — Escape and unescape HTML entities.
- Hash Calculator — Compute SHA-1/256/384/512 of text or files.
- MD5 Hash — Pure front-end MD5 digest computation.
- Morse Code — Convert text to/from Morse code, with beep playback.
- Radix Converter — Convert numbers between any bases 2–36.
- Unicode Converter — Convert Chinese to/from \u escape sequences.
- JWT Decoder — Decode JWT header and payload, show expiry.
- Random Password Generator — CSPRNG-based strong passwords, batch supported.
- Password Entropy — Estimate password strength and brute-force time.
- UUID Generator — Batch-generate v4 UUIDs, optional upper-case and no dashes.