编码与加密
Data URL 转换器
免费的 data URL 转换器。将任何文件编码为 base64 data URL 用于内联嵌入,或将 data URL 解码回文件。基于浏览器,无需上传。
编辑注
Understanding · Files, smuggled into a string.
本深度章节目前仅有英文版本。上方的转换工具支持您的语言;长篇说明文章尚未翻译。
常见问题
Quick answers.
›What is a Data URL?
A Data URL is a scheme used to embed data in-line in documents, formatted as `data:[mediatype][;base64],data`. It is commonly used for small icons or CSS assets to reduce external dependencies.
›Are my files secure?
Yes. The encoding and decoding happen entirely within your browser's memory. No file data is sent to our servers or stored permanently.
›When should I avoid Data URLs?
Base64 encoding increases file size by approximately 33% compared to binary files. Large files should be kept as separate assets to avoid slowing down page renders and to allow for browser caching.
›How do I use the output in CSS?
Copy the generated string and paste it into a `url()` function, such as `background-image: url('data:image/png;base64,...');`. This embeds the image directly within your stylesheet.
大家也在搜索
Use with
What people reach for next.
相关工具