🔍

首页Home › 编码与加密Encoding & Crypto

🔗 UTF-8 转 Data URIConvert UTF-8 to Data URI

把文本做成带 charset=utf-8 的 Data URI,MIME 类型可改(默认 text/plain),可选 Base64。本地处理。Build a Data URI with charset=utf-8 from text; the MIME type is editable (text/plain by default) and Base64 is optional. Processed locally.

使用说明与常见问题How-to & FAQ

「UTF-8 转 Data URI」是什么?What is the Convert UTF-8 to Data URI tool?

把文本做成带 charset=utf-8 的 Data URI,MIME 类型可改(默认 text/plain),可选 Base64。本地处理。Build a Data URI with charset=utf-8 from text; the MIME type is editable (text/plain by default) and Base64 is optional. Processed locally.

如何使用「UTF-8 转 Data URI」?How do I use the Convert UTF-8 to Data URI tool?

在「UTF-8 转 Data URI」中,把内容粘贴或输入到上方输入框,按需设置「MIME」,结果会实时显示在下方,点击「复制结果」即可复制。例如输入「Hi」,得到「data:text/plain;charset=utf-8,Hi」。In the Convert UTF-8 to Data URI: Paste or type into the input box, adjust "MIME"; the result appears below instantly — click "Copy result" to copy it. Example: "Hi" → "data:text/plain;charset=utf-8,Hi".

会带 charset 吗?Is the charset included?

会。百分号形式和 Base64 形式都会写上 ;charset=utf-8,例如 data:text/plain;charset=utf-8;base64,5Lit5paH,这样浏览器不会把中文按 US-ASCII 读成乱码。Yes. Both the percent form and the Base64 form include ;charset=utf-8, for example data:text/plain;charset=utf-8;base64,5Lit5paH, so browsers do not read the text as US-ASCII.

MIME 类型可以填什么?What can I put in the MIME field?

填「类型/子类型」,如 text/plain、text/html、text/csv、application/json;不要加参数(charset 会自动加上)。格式不对会报错;留空时用 text/plain 并给出提示;非文本类型(如 image/png)可以用,但会提示这里装的是文字。Use type/subtype, such as text/plain, text/html, text/csv or application/json, without parameters (the charset is added for you). An invalid value is an error; an empty field uses text/plain with a note; a non-text type such as image/png is allowed, with a note that the URI holds text.

输入和输出是什么样的?What does the input and output look like?

例如在「UTF-8 转 Data URI」中输入 Hi,输出为:data:text/plain;charset=utf-8,Hi。For example, the Convert UTF-8 to Data URI turns the input Hi into: data:text/plain;charset=utf-8,Hi.

有哪些选项可以调整?What options can I adjust?

「UTF-8 转 Data URI」的设置:「MIME」默认 text/plain;可勾选:「使用 Base64」。每次生成结果都按当前设置处理。Settings in the Convert UTF-8 to Data URI — "MIME" default text/plain; tick boxes: "Use Base64". The result always uses the current settings.

编码和加密有什么区别?Is encoding the same as encryption?

编码(如 Base64、URL 编码)可直接还原,不提供保密性;加密需要密钥。「UTF-8 转 Data URI」的处理全部在本地完成。No. Encoding (Base64, URL…) is reversible by anyone; encryption needs a key. The Convert UTF-8 to Data URI works fully offline in your browser.

「UTF-8 转 Data URI」免费吗?需要注册吗?Is the Convert UTF-8 to Data URI free? Do I need an account?

「UTF-8 转 Data URI」完全免费,无需注册或安装,打开网页即可使用,手机和电脑都能用;输入的内容只在你的浏览器本地处理。The Convert UTF-8 to Data URI is completely free with no sign-up or install and works on phones and desktops; what you enter is processed only in your browser.

相关工具Related tools

🔗 Data URI 转 UTF-8 文本Convert Data URI to UTF-8🔗 Unicode 转 Data URLConvert Unicode to Data URL🔟 UTF-8 转十进制字节Convert UTF-8 to Decimal8️⃣ UTF-8 转八进制字节Convert UTF-8 to Octal🔤 UTF-8 转 UTF-16Convert UTF-8 to UTF-16🔤 UTF-8 转 UTF-32Convert UTF-8 to UTF-32🎲 随机 UTF-8 文本Generate Random UTF-8🔓 UTF-8 URL 解码URL Decode UTF-8🔗 UTF-8 URL 编码URL Encode UTF-8✅ 校验 UTF-8Validate UTF-8₈ 八进制转文本Convert Octal to Text🔤 ASCII ↔ 十六进制ASCII Hex Converter

← 全部工具All tools