Text · 52 tools · nothing uploads

Unicode escape converter

Unicode escape converter. Runs entirely on your device, nothing is uploaded.

Input

Options

live

Unicode escape converter turns every non-ASCII character in a pasted text into an escape sequence, or reverses existing escapes, in JS, CSS, Python, decimal HTML, hex HTML or U+ syntax. Only characters outside printable ASCII, 0x20 to 0x7e, are escaped; the rest passes through untouched. Reversing recognizes only the one form you selected, so mixed syntax will not fully round-trip.

Questions

Which characters get escaped?

Only characters outside the printable ASCII range 0x20 to 0x7e; ordinary ASCII letters, digits and punctuation pass through unescaped in either direction.

Can I convert between two different escape syntaxes directly?

Not in one step. Reversing only recognizes the one form selected in the form option, so converting from HTML entities to Python escapes needs two runs: from-escapes with form html-dec first, then to-escapes with form python.

What is the difference between the js and python forms for characters outside the Basic Multilingual Plane?

JS uses a braced \u{...} form for code points above 0xFFFF, while Python uses an eight-digit \U escape for the same range; both use a plain four-digit \u for anything within the Basic Multilingual Plane.

What does the css form look like?

A backslash followed by the hex code point and a trailing space, such as \E9 for e with an acute accent, which is the escape syntax CSS itself uses inside identifiers and strings.

What happens if I try to reverse text that has no escapes in it?

It passes through unchanged, since the reversing patterns simply find nothing to replace; there is no error for an input with no matching escape sequences.

Related Text tools