Skip to content
Sealpaste

Delete all recent work?

This removes the 0 items saved in this browser. Your settings stay.

Stop saving recent work?

New work won't be saved in this browser. The 0 items already saved can stay or go.

URL Encode & Decode

Text

Paste text, or

CtrlV paste · Ctrl↵ run now

Encoded
Ready
Ln 1, Col 1
Runs in your browser. Nothing you paste is uploaded unless you share it.

Percent-encode text for URLs and query strings, or decode %20-style URLs back to text

Encode text so it’s safe inside a URL, or decode a percent-encoded URL back to readable text.

How to use it

  1. Choose Encode or Decode. To encode, pick Component for one value, or Whole URL to keep : / ? # & as they are.
  2. Turn on + for spaces for HTML form data, then paste your text or URL, or open a file to encode its bytes.
  3. Options holds the charset (Latin-1, Windows-1252, Shift_JIS and more), Each line, and %0A or %0D%0A for line breaks.
  4. Copy or download the result. Decoding a URL with a ? also lists its query parameters under the text.

Examples

Encode a query value

Input
café & crème
Result
caf%C3%A9%20%26%20cr%C3%A8me

Decode a redirect parameter

Input
%2Faccount%3Ftab%3D2
Result
/account?tab=2

Component or Whole URL

Component works like JavaScript’s encodeURIComponent: it escapes every character that has a meaning in a URL, including / ? & = #. Use it for a single value you insert into a URL.

Whole URL works like encodeURI: it keeps the URL’s structure and only escapes spaces, non-ASCII characters and a few unsafe symbols. Use it to clean up a link; several links, one per line, are encoded line by line. Component encodes line breaks too, as %0A, or as %0D%0A the way HTML forms send them; Each line encodes every line on its own instead.

InputComponentWhole URL
a ba%20ba%20b
a/b?c=da%2Fb%3Fc%3Dda/b?c=d
é%C3%A9%C3%A9

Character sets

Each %XX is one byte, and which bytes a character becomes depends on the character set. Today’s URLs use UTF-8, where é is %C3%A9. Older sites and forms used Latin-1 or Windows-1252 (é is %E9) or Shift_JIS, EUC-KR and other sets for Asian languages.

Pick the set under Options, Charset, to encode for such a server or to decode a link it wrote. A character the set has no bytes for is written as ? (%3F) and named in a note; on decode, bytes that are not in the set show as � and are counted.

TextUTF-8Windows-1252Shift_JIS
é%C3%A9%E9%3F (none)
日%E6%97%A5%3F (none)%93%FA

Questions

Should spaces be %20 or +?
In URLs, %20. The + form comes from HTML forms (application/x-www-form-urlencoded) and is only read as a space in query strings by servers that expect form data.
Why does decoding fail with "invalid escape"?
A % sign must be followed by two hex digits that form valid UTF-8, like %20 or %C3%A9. A bare % (e.g. "100%") has to be written as %25. A link from an older site may be in Latin-1, where é is %E9: pick that charset under Options.
Which characters does Component leave as they are?
Letters A–Z and a–z, digits and - _ . ! ~ * ' ( ). Everything else becomes % and two hex digits per UTF-8 byte, so é is %C3%A9.
Is my URL uploaded?
No. Everything runs in your browser, so your URL stays on your device. Nothing you paste is uploaded unless you share a result, which is locked with your password first. That matters because URLs can contain tokens and personal data.

Related tools