About

Tool No. 39 of Pikkola

A string leaves one program and arrives at another, and each program has its own way of writing the characters that would otherwise confuse it. Escaping is that rewriting. This page does it in six dialects, in both directions, and shows the bytes so the result can be checked instead of trusted.

What it does

Why the encoder is a decision, not a detail

encodeURIComponent encodes everything except the unreserved characters, so a value that sits after ?q= survives intact. encodeURI keeps the punctuation that gives an address its structure, which makes it right for a whole address and wrong for one value. The form encoding writes a space as a plus sign and leaves only a few characters bare, because that is what a server parsing application/x-www-form-urlencoded expects. A plus sign read as a space, or a slash read as a path separator, is how one wrong choice becomes a bug that takes an afternoon.

Why the bytes are shown

Mojibake is a byte problem, not a letter problem. When 가 arrives as ê°€, the UTF-8 bytes EA B0 80 have been read as three single-byte characters. The inspector puts the code point, the UTF-16 units and the UTF-8 bytes next to each character, so a string can be traced back to the byte that went wrong, and a decode that produced U+FFFD says how many sequences failed.

What it deliberately does not do

Why it is free

Pikkola builds small tools that do one job and keeps them free, with no account and no advertising. A static page that computes in the browser costs almost nothing to serve, so there is no reason to charge for it.

Contact

A string that escapes wrongly, a phrase that reads badly in Korean or Japanese, a format that should be here and is not: hello@pikkola.com. Send the input and what you expected to see.

Back to the studio