URLs may only contain a limited set of characters, so spaces, symbols and non-ASCII letters are written as percent-encoded UTF-8 bytes, for example a space becomes %20. Encode a value before placing it in a query string, or decode a copied link to read it.
Common uses
- Decoding a Base64 value found in a header or config file
- Percent-encoding a query parameter that contains spaces or symbols
- Embedding a small image in CSS or HTML as a data URI
Frequently asked questions
- What is the difference between encoding a component and a full URL?
- Encoding a component also escapes reserved characters like / ? & =, which is right for a single parameter value. Encoding a whole URL leaves those separators intact.
- Why does a plus sign sometimes mean a space?
- In form-encoded query strings a + stands for a space. In other parts of a URL it is a literal plus.