What Is URL Encoding?
URLs have a limited character set. Spaces, accents, ampersands and other reserved
symbols must be percent-encoded before they can be safely placed in a query string
or path. URL encoding replaces those characters with a percent sign followed by two
hexadecimal digits. For example, a space becomes %20 and an ampersand
becomes %26.
This tool encodes and decodes URL components and full URLs. It also supports the form-encoding convention where a plus sign represents a space. Everything runs locally in your browser.
Component vs Full URL Encoding
Component encoding escapes every reserved character and is the right choice for
query values, path segments and form fields. Full URL encoding preserves separators
such as :, /, ?, & and
# so the overall URL structure remains intact. Using the wrong mode is
a common source of broken links.
- Component: encode a single value, such as a search term or an ID.
- Full URL: encode an entire URL while keeping its separators.
How to Encode or Decode a URL
- Paste the text or URL into the input box.
- Select Encode or Decode.
- Choose the scope: component or full URL.
- Enable + as space when decoding form-encoded data.
- Copy or download the result.
Plus Signs and Spaces
In application/x-www-form-urlencoded data, a plus sign represents a
space. If you decode a form payload and see plus signs where spaces should be, enable
“+ as space”. For standard percent-encoded URLs, leave it disabled. When encoding,
component mode uses %20 for spaces, which is safe in URLs and query
strings.
Reserved and Unreserved Characters
Unreserved characters such as letters, digits, hyphens, underscores, dots and tildes
usually do not need encoding. Reserved characters have special meaning in URLs:
:, /, ?, #, [,
], @, !, $, &,
', (, ), *, +,
,, ; and =. Whether they need encoding depends
on where they appear in the URL.
Common Uses
- Encoding search parameters before building a link.
- Decoding tracking URLs to inspect their real destination.
- Debugging OAuth redirect URIs and API query strings.
- Passing Unicode text through systems that expect ASCII URLs.
- Inspecting form-encoded payloads.
Encoding Query Parameters Safely
Encode each key and value separately, then join them with & and
=. Do not encode the entire query string with component mode, because
that would escape the separators too. In JavaScript, URLSearchParams
handles encoding and decoding for you. When building links by hand, encode values
once and avoid double encoding.
Common Mistakes
Double encoding
Encoding an already encoded value turns %20 into %2520.
Decode first to inspect the original value, then encode once.
Encoding a full URL as a component
Component encoding escapes the slashes and question marks that make a URL a URL. Use full URL mode when you want to preserve the structure, and component mode only for individual values.
Unicode and UTF-8
Non-ASCII characters are encoded as UTF-8 bytes and then percent-encoded. For
example, accented letters become multiple % sequences. Decoding reverses
the process and returns the original text.
Malformed percent sequences
A percent sign must be followed by two hexadecimal digits. Values like
%ZZ are invalid and cause decoding errors. Check truncated or copied
values before decoding.
URL Encoding Is Not Encryption
Percent-encoding is reversible and does not protect data. Anyone can decode it. Do not use URL encoding to hide tokens, passwords or personal information. Use HTTPS and proper authentication for sensitive data.
Privacy
Encoding and decoding happen locally in your browser. The URLs and values you enter are not uploaded or stored. For Base64 values, use the Base64 Encoder / Decoder; for HTML escaping, use the HTML Entity Encoder / Decoder.
Related Tools
Clean URLs into readable slugs with the Slug Generator, format API payloads with the JSON Formatter, or inspect token values with the JWT Decoder.