Skip to content
SmallEasyTools

URL Encode / Decode

Make any text safe for a URL, or turn messy percent-encoded links back into readable text. Choose full-URL or component encoding and see every query parameter in a clear table.

  • Free
  • Runs in your browser
  • No sign-up needed

Query parameters

Free and unlimited · runs entirely in your browser

Rate this tool:
Share: Facebook X LinkedIn WhatsApp Email

Quick answer

To URL-encode text, choose Encode and paste your text or link. Keep component mode on to encode everything that is not safe inside a parameter value (spaces, &, =, ?, /, #, non-English letters), or turn it off to encode a full URL while keeping its structure. To decode, choose Decode and paste the encoded text — %20 and + become spaces again. The Query parameters table lists every parameter name and value.

Modes:
Encode and decode
Encoding types:
Component (encodeURIComponent) or full URL (encodeURI)
Decoding:
Percent-encoding and + as space
Query parameters:
Parsed into a name/value table
Character support:
UTF-8 for all languages and emoji
Errors:
Clear message for invalid sequences
Upload needed:
No – runs in your browser
Price:
Free

URLs can only contain a limited set of characters. Letters, digits and a few symbols are fine, but spaces, quotes, ampersands, non-English letters, emoji and many punctuation marks must be percent-encoded — written as a % sign followed by two hexadecimal digits for each byte. A space becomes %20, an ampersand %26, the Bengali letter "আ" becomes %E0%A6%86.

If you build links by hand — for tracking parameters, search URLs, WhatsApp messages, mailto links, API requests or redirects — forgetting to encode can break the link or, worse, change its meaning: an unencoded & inside a value starts a new parameter, and an unencoded # cuts off everything after it. On the other hand, encoded links from analytics reports, server logs and emails are hard to read.

Our URL encoder and decoder handles both directions. Encode a single value safely with component encoding, or encode a complete URL while keeping its ://, slashes, question mark and ampersands intact. Decode any percent-encoded string — including + used for spaces in form data — and inspect the query parameters in a clean table to see exactly what a long link contains.

How to encode or decode a URL – step by step

  1. 1 Choose the modeEncode to make text URL-safe, Decode to make an encoded URL readable.
  2. 2 Paste your inputPaste a single value, a query string or a full URL.
  3. 3 Choose the encoding typeKeep component mode on for parameter values; turn it off to encode a whole URL without breaking its structure.
  4. 4 Check the parametersReview the Query parameters table to see each name and value.
  5. 5 Copy the resultCopy the encoded or decoded text and use it in your link, code or report.

Why use this URL encoder?

Encode and decode

Both directions, updated as you type.

Component or full URL

The right encoding for values or complete links.

Query parameter table

See every parameter clearly.

UTF-8 support

Correct encoding for all languages and emoji.

Handles + as space

Decodes form-style query strings properly.

Private

Runs in your browser; nothing is sent anywhere.

Component vs. full-URL encoding

Component (encodeURIComponent)Full URL (encodeURI)
EncodesEverything except A–Z a–z 0–9 - _ . ! ~ * ' ( )Only characters that are never valid in a URL
KeepsNothing structural: / ? # & = and other URL delimiters
Use forA single parameter value, a search term, a message textA complete URL that contains spaces or non-English characters
The most common mistake is encoding a whole URL with component encoding (which turns https:// into https%3A%2F%2F) or inserting a value with full-URL encoding (which leaves & and = unencoded and breaks the query). Encode each value with component mode, then assemble the URL.

Common percent-encoded characters

CharacterEncodedCharacterEncoded
space%20 (or + in forms)&%26
=%3D?%3F
/%2F#%23
+%2B%%25
"%22@%40

%20 or + for spaces?

In the path of a URL, a space must be %20. In query strings submitted by HTML forms (application/x-www-form-urlencoded), spaces are traditionally written as +. Most servers accept both in query strings, but a literal plus sign in a value must then be encoded as %2B, otherwise it turns into a space. The decoder treats + as a space, which matches how browsers and servers read form data.

Practical uses

  • Tracking links — encode campaign names before adding them to URLs; or let our UTM Builder do it.
  • WhatsApp and SMS links — pre-filled messages must be encoded; our WhatsApp Link Generator handles this automatically.
  • Mailto links — subject and body text need encoding.
  • API requests — query values with spaces, symbols or JSON must be encoded.
  • Reading logs and analytics — decode long encoded URLs to see search terms and parameters.
  • Redirects — return URLs passed as parameters (redirect_to=...) must be fully encoded.

Non-English characters in URLs

Modern browsers show Bengali, Arabic, Chinese or accented letters in the address bar, but behind the scenes they send them percent-encoded as UTF-8 bytes. When you copy such a link from the address bar, it often turns into a long string of %XX codes. Decode it here to read it, and encode human-readable URLs before using them in code, sitemaps or emails. For SEO-friendly page addresses, many sites prefer simple English slugs; create them with the Text to Slug tool.

Anatomy of a URL

Understanding the parts of a URL makes it clear what needs encoding. Take https://shop.example.com:443/products/blue-shirt?size=m&colour=navy#reviews. The scheme (https) says how to connect. The host (shop.example.com) names the server, and the optional port (443) the door on that server. The path (/products/blue-shirt) identifies the resource, with slashes separating levels. The query string after the question mark carries parameters as name=value pairs joined by ampersands. The fragment after the hash points to a part of the page and is never sent to the server. Each part has its own reserved characters, which is why a slash is fine in a path but must be encoded inside a parameter value, and why a hash inside a value must always be encoded or it will cut the URL short.

Encoding in different programming languages

Every language has functions for this. In JavaScript, use encodeURIComponent for values and the URL and URLSearchParams objects to build links safely. In PHP, rawurlencode follows the %20 style and urlencode the + style, while http_build_query builds a whole query string. In Python, urllib.parse.quote and urlencode do the same. Using these functions — rather than joining strings by hand — prevents almost all encoding bugs. The online tool is ideal for checking what the correct output should look like and for decoding values while debugging.

Double encoding

If a URL contains %2520, it has been encoded twice: the % of %20 was itself encoded as %25. This happens when code encodes an already-encoded string. Decode it twice to see the original, and fix the code to encode only once. Double encoding is a common cause of broken links and "page not found" errors after redirects.

Security and URL encoding

Attackers sometimes hide malicious links or scripts behind encoding, hoping filters and people will not recognise them. A link that looks harmless but contains long %XX sequences deserves a closer look: decode it here to reveal the real destination or payload before clicking. For developers, encoding output correctly is also a key part of preventing injection problems — values placed in URLs should always be encoded for the URL context.

URL encoding vs. Base64

Percent-encoding keeps ordinary letters readable and changes only unsafe characters, so URLs remain understandable. Base64 converts everything into a compact, unreadable string and is used to carry binary data or whole payloads. When Base64 needs to appear in a URL, use its URL-safe variant from our Base64 tool or percent-encode it.

Troubleshooting

  • "Invalid percent-encoded sequence". The text contains a % not followed by two valid hex digits, or a broken multi-byte sequence. Check where the text was cut.
  • https:// became https%3A%2F%2F. You encoded a full URL in component mode; turn component mode off.
  • Plus signs turned into spaces. Encode literal + as %2B in query values.
  • No query parameters shown. The input is not a complete URL with a ? section.

Frequently asked questions

What is URL encoding?

Replacing characters that are not allowed in URLs with % followed by hexadecimal codes, also called percent-encoding.

How do I decode a URL?

Choose Decode and paste the encoded text; %20 and other codes are converted back.

What does %20 mean?

It is an encoded space.

Should I use %20 or + for spaces?

%20 in paths; in query strings both work, but + is used by forms.

What is the difference between encodeURI and encodeURIComponent?

encodeURI keeps URL structure characters; encodeURIComponent encodes everything for use inside a value.

Does it support non-English characters?

Yes. Text is encoded as UTF-8.

Can I see the query parameters of a URL?

Yes. The Query parameters table lists every name and value.

What is double encoding?

Encoding an already-encoded string, producing codes like %2520. Decode twice to fix it.

Is my data sent anywhere?

No. Everything runs in your browser.

Is the URL encoder free?

Yes. No sign-up required.

Why does my link break when it has &?

An unencoded & in a value starts a new parameter. Encode it as %26.

Does the fragment after # get sent to the server?

No. The part after # stays in the browser, so encode # inside values as %23.

Last updated November 21, 2026 · Written and tested by the SmallEasyTools team.