YourTools.
简体中文
Back to the catalog
Tools

Unicode, HTML, URL and Punycode escapes

Convert text to and from \u escapes, HTML numeric entities, percent-encoding in any character set (such as GBK URLs), Quoted-Printable and Punycode domains.

Process locally

Files stay in this browser session. Closing or clearing releases them.

Add text

Type or paste the text to process

Adjust settings

Optional: Format, Direction, Characters to encode and more

Unicode, HTML, URL and Punycode escapes

Run

Processes in this browser; cancel at any time

Add text first

About this tool

Convert text to and from \uXXXX Unicode escapes, HTML numeric entities, percent-encoding in any character set, Quoted-Printable as used in email, and Punycode domains. Use it to read \u4f60\u597d in a log or a JSON file, to build a GBK-encoded URL parameter, or to turn 中文.com into xn--fiq228c.com.

You can encode only non-ASCII characters, leaving letters and symbols as they are, or every character. Percent-encoding and Quoted-Printable work with UTF-8, GBK, Big5, Shift_JIS and other character sets. Up to 1 MB of text is converted in your browser without being uploaded.

How to use it

  1. Type or paste the text, or select Use example.
  2. Choose a “Format”, such as “Unicode escapes (\uXXXX)” or “Percent-encoding (URL)”, and set “Direction” to “Encode” or “Decode”.
  3. When encoding, choose “Non-ASCII only” or “All characters (URL: all but unreserved)” under “Characters to encode”. For percent-encoding and Quoted-Printable, also pick a “Character set”.
  4. Select Run, then preview the result and download it as a text file.

Formats and limits

Input
Text
Output
Plain text
Size limit
1 MB
Settings
Format (Unicode escapes, HTML decimal entities, HTML hex entities, Percent-encoding, Quoted-Printable, Punycode domains); Direction (Encode, Decode); Characters to encode (Non-ASCII only, All characters); Character set
Privacy
Files stay in the current browser session. No file bytes are uploaded.
Price
Free, no sign-up

Common questions

Why does an emoji become two \u escapes?

Each \uXXXX is one UTF-16 code unit, and characters beyond the Basic Multilingual Plane, such as emoji, need two: U+1F600 becomes \ud83d\ude00. Decoding joins such pairs back into one character and also reads \u{1F600}, \U0001F600, %uXXXX and \xXX.

Why are spaces and & left alone by percent-encoding?

The default, “Non-ASCII only”, encodes only characters such as Chinese and leaves letters, spaces and symbols as they are. To encode a whole parameter value, choose “All characters (URL: all but unreserved)”: everything except letters, digits and - . _ ~ is encoded, and spaces become %20.

How do I decode a GBK-encoded URL?

Set “Character set” to GBK before decoding, and %C4%E3%BA%C3 becomes 你好. With the wrong character set the bytes cannot be read and you get an error. A + stays a + and is not turned into a space.

Does HTML decoding handle named entities like &?

No. This tool reads numeric entities such as 中 and 中, in either format, and leaves named entities unchanged. Use the “Encode and decode text” tool for &, < and other named entities.

How do I convert a domain with Punycode?

Enter one domain per line. Encoding turns each non-ASCII label into one starting with xn--, and decoding turns it back. Enter only the domain itself, without https:// or a path.