🔍

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

🔗 Data URI 转 UTF-8 文本Convert Data URI to UTF-8

从文本类 data: URI(百分号编码或 ;base64)取出文字,按 URI 里的 charset 解码(默认 UTF-8)。本地处理。Extract the text from a text data: URI (percent-encoded or ;base64), decoded with the charset named in the URI (UTF-8 by default). Processed locally.

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

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

从文本类 data: URI(百分号编码或 ;base64)取出文字,按 URI 里的 charset 解码(默认 UTF-8)。本地处理。Extract the text from a text data: URI (percent-encoded or ;base64), decoded with the charset named in the URI (UTF-8 by default). Processed locally.

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

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

支持哪些字符集?Which charsets are supported?

按 URI 里的 charset 参数解码:utf-8(未写 charset 时默认)、utf-16le、utf-16be、iso-8859-1、windows-1252、gbk、gb18030、big5、shift_jis 等浏览器支持的编码都可以;不支持的会直接报错。注意按浏览器标准,iso-8859-1 实际按 windows-1252 解码,utf-16 等同 utf-16le。The charset parameter in the URI is used: utf-8 (the default when no charset is given), utf-16le, utf-16be, iso-8859-1, windows-1252, gbk, gb18030, big5, shift_jis and the other encodings the browser supports. An unsupported charset gives a clear error. As in browsers, iso-8859-1 is decoded as windows-1252 and utf-16 means utf-16le.

百分号形式里的 + 是空格吗?Is + a space in the percent form?

不是。data URI 不是表单编码,+ 就是加号本身;空格要写成 %20。No. A data URI is not form encoding, so + is a literal plus sign; a space must be written as %20.

图片等非文本 data URI 能解码吗?Can it decode image or other non-text data URIs?

不能。MIME 类型不是文本(如 image/png、application/octet-stream)时会提示「这不是文本 data URI」。文本类包括 text/*、application/json、application/xml、*+xml、*+json 等。No. If the MIME type is not a text type (such as image/png or application/octet-stream) you get a "not a text data URI" message. Text types include text/*, application/json, application/xml, *+xml and *+json.

字节无效时会怎样?What happens with invalid bytes?

UTF-8 会指出第一个出错的字节位置和原因(如过长编码、被截断、代理区码位);其他字符集会说明字节不是该编码的有效文本。开头的 BOM 会被去掉并给出提示。For UTF-8 the first bad byte is reported with its position and the reason (overlong, truncated, surrogate and so on); for other charsets you are told the bytes are not valid text in that encoding. A leading BOM is removed, with a note.

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

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

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

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

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

「Data URI 转 UTF-8 文本」完全免费,无需注册或安装,打开网页即可使用,手机和电脑都能用;输入的内容只在你的浏览器本地处理。The Convert Data URI to UTF-8 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

🔗 UTF-8 转 Data URIConvert UTF-8 to Data URI🔗 Unicode 转 Data URLConvert Unicode to Data URL🔟 十进制字节转 UTF-8Convert Decimal to UTF-88️⃣ 八进制字节转 UTF-8Convert Octal to UTF-8🔤 UTF-16 转 UTF-8 文本Convert UTF-16 to UTF-8🔤 UTF-32 转 UTF-8 文本Convert UTF-32 to UTF-8🔢 UTF-8 转任意进制Convert UTF-8 to Arbitrary Base🧬 UTF-8 转 Base64Convert UTF-8 to Base64🔢 UTF-8 文本转码位Convert UTF-8 to Code Points🔟 UTF-8 转十进制字节Convert UTF-8 to Decimal8️⃣ UTF-8 转八进制字节Convert UTF-8 to Octal🔤 UTF-8 转 UTF-16Convert UTF-8 to UTF-16

← 全部工具All tools