Toolstead
为日常开发杂务准备的小而专注的工具 —— 不用注册、不上传、不追踪。打开 DevTools 的 Network 面板看一眼:转换任何东西都是零请求。
编码转换
Base64 转图片
粘贴任何 Base64 —— 带前缀、裸串、折行、URL-safe,甚至已经坏掉的 —— 直接看到图。
图片转 Base64
拿到你真正需要的那种字符串:Data URI、纯 Base64、CSS、HTML 或 JSON。
裸 Base64 解码器
不需要 data: 前缀。格式从字节读出,而不是听声明。
URL-safe Base64 转图片
处理 JWT、Cookie 与查询参数里那套 - 和 _ 字母表。
Base64 转 PNG
把裸字符串直接解成 .png 文件,透明通道原样保留。
Base64 转 JPG
靠 FF D8 FF 签名识别 JPEG,没有前缀也能认。
PNG 转 Base64
把透明 PNG 编码成可直接写进 CSS 或 JSON 的 Data URI。
JPG 转 Base64(CSS 用)
已经替你把引号和外壳处理好,粘进样式表或邮件模板即可。
指南 文章目前只有英文版
把图片塞进 Base64 的过程中所有容易出问题的地方 —— 以及怎么修。
Base64 Image Not Showing: How to Find the Real Cause
Six checks, cheapest first, that separate a bad string from a bad prefix from bytes that were never an image. Includes the two causes almost nobody checks.
Base64 Line Breaks and Padding: Why They Break Decoders
MIME wraps Base64 at 76 characters and padding rounds it to a multiple of four. What both rules are for, and how to handle strings that break them.
Base64 Overhead: Why Data URIs Make Files 33% Bigger
The 4-for-3 arithmetic behind Base64, why gzip cannot recover it for images, and where the break-even point for inlining an asset actually sits.
Base64 vs Hex, Base32 and ASCII85: Encodings Compared
Four ways to turn bytes into text, with different alphabets, different overhead and different failure modes. Which one belongs in which situation.
这些工具为什么这样设计
数据永远不离开浏览器。这里每个工具都完全在客户端运行。没有后端可以接收数据 —— 这也是断网时页面照常可用的原因,以及为什么转换一张 5 MB 的图片一个请求都不会发出。
失败会被解释清楚,而不只是报错。Base64 工具不会停在一句"输入无效"。它会告诉你哪个字符坏了、精确位置与码点、长度是否意味着被截断、以及这段字节到底是 gzip 还是图片 —— 能一键修的就给出一键修复。
默认离线可用。本站可安装为 PWA,工具加载过之后断网也能继续用 —— 调试内网服务时很实用。
不需要账号、不保存历史、不上传。若日后引入广告,也会限制在位置明确、高度固定的广告位内,绝不遮挡操作区。