Skip to content
All tools
English

URL encode and decode

Turn %D9%85%D8%B1%D8%AD%D8%A8%D8%A7 back into readable text, or make any text safe to put in a link.

Your files never leave your device
Direction

Paste the encoded text. Spaces and line breaks are ignored where they do not matter.

Options

How to use it

  1. Choose a direction

    Decode makes a link readable; Encode makes text safe for a link.

  2. Pick the mode

    Use "Parameter value" for parts of a link, "Whole URL" for a full address.

  3. Copy the result

    When decoding a link, every query parameter is listed separately.

Why links fill up with % signs

A URL may only contain a small set of ASCII characters. Everything else, including spaces, Arabic letters and emoji, is first turned into UTF-8 bytes, and each byte is written as % plus two hex digits. That is percent-encoding (RFC 3986). The Arabic word مرحبا is 10 bytes in UTF-8, so it becomes 10 %XX groups.

Which mode to use

  • Parameter value (encodeURIComponent) encodes everything that could break a URL, including &, =, /, ? and #. Use it for a single value you are putting into a query string or path segment.
  • Whole URL (encodeURI) leaves the URL structure alone and only encodes characters that are never allowed, such as spaces and non-ASCII letters.
  • Form data is how HTML forms send data (application/x-www-form-urlencoded): like a parameter value, but spaces become +.

The plus sign problem

In a query string, + often means a space because of how forms work, but in a path it is a literal plus. If a decoded search term shows + between words, turn on "Treat + as space". If it is part of a phone number or a Base64 value, leave it off.

Double encoding

If the output still contains %25, the text was encoded twice (%25 is the encoding of % itself). Decode it again. Need to decode something else? Try the auto-detect decoder, or the Punycode converter for Arabic domain names.

Frequently asked questions

What is the difference between encodeURI and encodeURIComponent?
encodeURI keeps characters that give a URL its structure (: / ? # & =). encodeURIComponent encodes them too, so it is the right choice for a single value inside a URL.
Why do I get "malformed" when decoding?
A % is followed by something that is not two hex digits, or the bytes are not valid UTF-8. The text may be cut off, or it may use an old encoding instead of UTF-8.
Should I encode Arabic in my own URLs?
Browsers show Arabic paths readably and encode them automatically when sending. In HTML, sitemaps and APIs, write the encoded form to be safe.