在浏览器中编码、解码和转换Base64。数据不离开您的设备——无上传、无追踪。
编码器、解码器、转换器、验证器 — 覆盖所有工作流程。
Drag-and-drop any image. Get a data URI ready to paste into HTML, CSS, or JSON.
Paste any Base64 string. Preview and download the decoded image instantly.
Encode any UTF-8 text. Standard or URL-safe.
Any file type — PDF, ZIP, font, binary.
Decode JWT tokens, API headers, config values.
Recover original files from Base64 strings.
Decode and export as lossless PNG.
Convert with adjustable quality.
Modern format, smaller file sizes.
Check if a string is valid Base64.
Calculate encoded output size before embedding.
Get HTML/CSS embed code in one click.
Complete guide to Base64 encoding and RFC 4648.
每项操作都在浏览器原生API上运行。您的数据永不离开标签页。
拖放文件、粘贴字符串或上传图片。数据保持本地。
const file = input.files[0];
FileReader、atob/btoa和Canvas处理编码 — 内置于每个浏览器。
const b64 = btoa(binary);
复制字符串,下载文件。零网络请求。
// no uploads. ever.
background-image: url('data:image/png;base64,…')。+和/,在URL中会出问题。URL安全版本(RFC 4648 §5)将它们替换为-和_。