Encoder / Decoder

Convert text to and from Base64, URL, Unicode and Hex. 100% local.

Input Text or encoded string to convert
Output Conversion result

Encoder / Decoder / 编码互转工具

The Encoder / Decoder converts text to and from Base64, URL percent-encoding, Unicode escapes, and hexadecimal — the everyday "what do I do with this string of gibberish" tasks for developers, ops staff, and sellers. 编码互转工具支持 Base64、URL、Unicode、Hex 四种编码互转。Everything runs locally in your browser; nothing is uploaded.

The four encodings / 四种编码

  • Base64 — represents binary data (files, tokens, API payloads) as plain-text characters. Common in JWTs, e-mail attachments, .env values, and API headers.
  • URL (percent-encoding) — escapes characters so they are safe inside URLs and query strings (%20, %E4%BD%A0…). Used when building links, form data, and redirects.
  • Unicode (\uXXXX) — converts text to and from JavaScript/JSON escape sequences. Essential when a log or JSON dump shows \u4f60\u597d and you need 你好 back.
  • Hex — the raw UTF-8 bytes of your text as hex pairs. Used for checksums, binary inspection, and protocol debugging.

Use cases / 使用场景

  • Decode Base64 strings from API docs, JWTs, and error messages to read the payload
  • Build URL-safe links: encode Chinese text or emoji for a query parameter
  • Recover human-readable text from \uXXXX-escaped log lines or JSON dumps
  • Inspect UTF-8 byte sequences when debugging encodings or file exports

Important: Base64 is not encryption

Base64 and the other encodings here are representations, not cryptography. A Base64 string is trivially decodable by anyone — never use it to hide secrets, passwords, or personal data. If you need to protect a secret, use encryption (AES) with a key. 编码不等于加密,切勿用 Base64 保存密码或敏感信息。

FAQ / 常见问题

Q: Does it handle Chinese / multi-byte text? — Yes. Base64 and Hex conversions use UTF-8 internally, so Chinese, Japanese, emoji and other multi-byte characters round-trip correctly. 支持 UTF-8 多字节字符。

Q: Why do I get an "invalid input" error when decoding? — The input is not in the expected format: a non-Base64 string, or an odd-length hex number. Check for missing padding (==) and copy the string exactly. 输入格式不对时请检查填充符号(==)或复制完整性。

Related tools / 相关工具

  • Hash Calculator — one-way digests (MD5 / SHA) for integrity checks 哈希计算
  • Text Info Extractor — pull structured data out of logs and dumps 文本信息提取
  • Regex Builder — build & test regexes with plain-language questions 正则生成