Logo
Prompt Minds

URL Encoder / Decoder — Percent-Encode and Decode URLs

Encode text for URLs, decode %-escaped links, and see every part of a URL clearly.

URL के लिए टेक्स्ट एनकोड करें, %20 वाले लिंक डिकोड करें और URL के हिस्से देखें।

100% private — runs in your browser · Last Updated: October 2026
—

URL breakdown

PDNob logoPDNob Your Lightweight AI-Powered PDF Editor Edit · Convert · Compress · OCR · AI Download for Desktop

Quick Tips

Encode parameter values with Component mode
Use Full URL mode only for complete links
%2520 means something was encoded twice
Forms use + for spaces; paths use %20
Use the breakdown to read tracking parameters
All Tools
Advertisement

Quick Answer

To encode text for a URL, paste it and choose “Component” — spaces become %20, & becomes %26 and Hindi letters become UTF-8 codes like %E0%A4%B9. Choose “Full URL” to encode a whole address while keeping : / ? & = intact, or “Form data” for + instead of %20. Switch to Decode to turn %-escaped text back into readable characters. The breakdown below lists every query parameter, decoded.

What is a URL Encoder / Decoder?

A URL Encoder / Decoder (URL एनकोडर / डिकोडर) converts text into a form that can travel safely inside a web address, and converts it back. URLs may only contain a limited set of characters, and some of those — like ?, &, =, # and / — have special jobs. Anything else, including spaces, quotes, Hindi letters, emoji and symbols like ₹, must be percent-encoded: replaced by a % sign followed by two hexadecimal digits for each byte. A space becomes %20, an ampersand becomes %26, and “ह” becomes %E0%A4%B9.

Developers need this when building API requests, query strings, redirect links and OAuth callbacks; marketers need it when reading long tracking URLs; and everyone occasionally needs to turn an unreadable link full of %-codes back into plain text. This free tool encodes in three standard ways — URL component, full URL and form data — decodes with helpful error messages, and breaks any URL into its parts with a decoded table of query parameters.

Key Features

  • Component encoding — strict RFC 3986 encodeURIComponent for parameter values and path segments.
  • Full-URL encoding — encodeURI keeps the URL's structure intact.
  • Form encoding — spaces as +, matching HTML form submissions.
  • Decoding in all three modes with clear errors for broken sequences.
  • Full Unicode support — Hindi, other scripts, emoji and currency symbols via UTF-8.
  • URL breakdown — protocol, host, port, path and fragment.
  • Query parameter table with decoded names and values.
  • Private — runs locally in your browser.

How to Use It — Step by Step

  1. Choose Encode or Decode.
  2. Select the encoding type — Component, Full URL or Form data.
  3. Paste your text or URL; the result updates instantly.
  4. Copy the result, or press Use result as input to encode or decode again.
  5. Read the breakdown to inspect host, path and parameters.

Encoding Examples

InputModeOutput
hello world & moreComponenthello%20world%20%26%20more
hello world & moreForm datahello+world+%26+more
a/b?c=d#eComponenta%2Fb%3Fc%3Dd%23e
हिंदीComponent%E0%A4%B9%E0%A4%BF%E0%A4%82%E0%A4%A6%E0%A5%80
₹500Component%E2%82%B9500
https://example.com/search?q=हिंदी टूल्सFull URLhttps://example.com/search?q=%E0%A4%B9…%20%E0%A4%9F…

Component vs Full URL vs Form Data

Component mode encodes every character except the unreserved set (A–Z, a–z, 0–9, - _ . ~). Use it for a single piece of a URL: a search term, a redirect target inside a parameter, a file name in a path. Our component mode also encodes ! ' ( ) * for strict RFC 3986 compliance, which some APIs and signature schemes (like OAuth 1.0) require.

Full URL mode leaves reserved characters that structure a URL — : / ? # [ ] @ ! $ & ' ( ) * + , ; = — untouched and encodes only spaces, non-ASCII characters and a few unsafe symbols. Use it to clean up a complete address that someone typed with spaces or Hindi words.

Form data mode follows application/x-www-form-urlencoded, the format browsers use for HTML form submissions: like component mode, but spaces become +. When decoding form data, + is turned back into a space.

Anatomy of a URL

Take https://shop.example.com:8443/products/shoes?color=red&size=9#reviews:

  • Protocol (scheme): https:
  • Host: shop.example.com
  • Port: 8443 (omitted when it is the default, 443 for https)
  • Path: /products/shoes
  • Query string: color=red&size=9 — parameters separated by &
  • Fragment: reviews — handled by the browser, not sent to the server

The breakdown panel shows these parts for any URL you paste, using the browser's standard URL parser, and decodes each parameter so you can read values like q=%E0%A4%B9… as Hindi text.

Unicode and UTF-8

Modern URLs carry non-English text by converting each character to its UTF-8 bytes and percent-encoding every byte. Devanagari characters take three bytes, most emoji take four, and the rupee sign ₹ takes three — so ₹ becomes %E2%82%B9. Browsers usually display the readable characters in the address bar (this is called an IRI, an internationalised resource identifier) while sending the encoded form to servers. Domain names are a separate case: they use Punycode (xn--…) rather than percent-encoding.

URL Encoding in Code

  • JavaScript: encodeURIComponent(value), encodeURI(url), new URLSearchParams({ q: value }).toString() for form style.
  • Python: urllib.parse.quote(value), quote_plus(value) for form style, unquote() to decode.
  • PHP: rawurlencode() (RFC 3986) and urlencode() (form style).
  • Java: URLEncoder.encode(value, StandardCharsets.UTF_8) — form style with +.

When results from your code and this tool differ, check which style each uses — the + versus %20 difference is the most common source of confusion.

Worked Example: a WhatsApp Order Link

Small businesses often share links that open WhatsApp with a ready-made message. The format is https://wa.me/<number>?text=<message>, and the message must be component-encoded. For the message “Hi! I want to order 2 kg आम & 1 dozen केले”, this tool gives Hi%21%20I%20want%20to%20order%202%20kg%20%E0%A4%86%E0%A4%AE%20%26%201%20dozen%20%E0%A4%95%E0%A5%87%E0%A4%B2%E0%A5%87. Without encoding, the & would end the text parameter early and the customer would see only “Hi! I want to order 2 kg आम”. Paste your message into the tool in Component mode, copy the result and append it after ?text=. (The tool also encodes ! as %21 for strict RFC 3986 compliance; plain encodeURIComponent leaves it as !, and both work.)

Encoding and Security

Correct encoding is also a security matter. If user input is placed into a URL without encoding, a value containing &, = or # can add or override parameters — a problem known as parameter injection — and unescaped input in redirect URLs can be abused for open redirects or phishing. Always encode each value separately with a component encoder (or a library such as URLSearchParams), validate redirect targets against an allow-list, and remember that encoding is not encryption: anyone can decode a URL, so never put passwords or secrets in query strings, where they end up in browser history and server logs.

Common Uses

  • Building API requests and query strings with user input.
  • Encoding redirect URLs inside OAuth or login parameters.
  • Reading long tracking or affiliate links.
  • Fixing links that contain spaces or Hindi words.
  • Preparing WhatsApp “click to chat” links with pre-filled messages.
  • Debugging web server logs full of %-codes.
  • Creating mailto: links with encoded subjects and bodies.
  • Passing file names with spaces or brackets to download URLs.
  • Checking exactly what a browser will send when a link contains special characters.

Common Mistakes to Avoid

  • Encoding a whole URL in component mode — it breaks https:// and the slashes.
  • Not encoding parameter values — an & inside a value splits it into two parameters.
  • Double encoding — %2520 instead of %20.
  • Using + in paths — + only means a space in form-encoded query strings.
  • Forgetting UTF-8 — old systems using other encodings produce different %-codes.
  • Decoding untrusted input and inserting it into HTML — decode, then HTML-escape it before displaying, or you risk cross-site scripting.

Troubleshooting

  • “Cannot decode” — look for a % not followed by two hex digits, such as “50% off”; encode it as %25 or remove it.
  • No breakdown shown — the text is not a full URL; include https://.
  • Plus signs remain after decoding — switch to Form data mode.
  • Output differs from another tool by %21, %27, %28, %29 or %2A — this tool encodes ! ' ( ) * strictly; both forms decode to the same text.
  • Hindi shows as question marks elsewhere — the receiving system may not decode UTF-8; check its encoding settings.

Quick Glossary

  • Percent-encoding: representing a byte as % followed by two hex digits.
  • Reserved characters: characters with special meaning in URLs, such as / ? & = #.
  • Unreserved characters: letters, digits and - _ . ~, which never need encoding.
  • Query string: the part after ? holding key=value parameters.
  • Fragment: the part after #, used within the page.
  • RFC 3986: the standard that defines URI syntax.
  • Punycode: the xn-- encoding used for non-English domain names.
  • Double encoding: encoding text that was already encoded, producing %25XX sequences.

Why Use This URL Encoder?

It covers all three encoding styles developers actually meet, handles Hindi and emoji correctly, explains errors clearly and breaks URLs into readable parts — free, instant and private.

URL Encoder / Decoder — Key Facts

ComponentencodeURIComponent (strict RFC 3986): space → %20, & → %26, / → %2F
Full URLencodeURI: keeps : / ? & = # so the URL still works
Form dataSpaces → +, as in HTML form submissions
UnicodeUTF-8 bytes: “ह” → %E0%A4%B9, “₹” → %E2%82%B9
BreakdownProtocol, host, port, path, decoded query parameters, fragment
PrivacyRuns in your browser

Frequently Asked Questions

What is URL encoding?

URL encoding (percent-encoding) replaces characters that are not allowed or have special meaning in URLs with a % followed by two hexadecimal digits. A space becomes %20, & becomes %26, and non-English characters are converted to their UTF-8 bytes, each written as %XX.

What is the difference between encodeURIComponent and encodeURI?

encodeURIComponent encodes everything except letters, digits and - _ . ~ — use it for a single value such as a search term. encodeURI leaves URL structure characters like : / ? & = # alone — use it for a complete URL that only needs spaces and special characters fixed.

Why does my space become + instead of %20?

HTML forms submitted with application/x-www-form-urlencoded use + for spaces. Choose “Form data” to produce or decode that style. In paths, use %20.

How are Hindi characters encoded in URLs?

Each character is converted to UTF-8 bytes and every byte becomes %XX. “ह” is three bytes, so it becomes %E0%A4%B9. Browsers often show the readable Hindi in the address bar but send the encoded form.

Why do I get a decoding error?

Decoding fails when a % is not followed by two hex digits (e.g. “100%”), or when the bytes do not form valid UTF-8. Fix or remove the stray % and try again.

Should I encode an entire URL with Component mode?

No — that would turn https:// into https%3A%2F%2F and break the link. Use Full URL mode for whole URLs, or encode only the parameter values with Component mode.

What characters never need encoding?

Unreserved characters — A–Z, a–z, 0–9, hyphen, underscore, full stop and tilde — are always safe in URLs.

Why is my URL double-encoded (%2520)?

%25 is an encoded %. If you see %2520, the text was encoded twice. Decode once to get %20, then once more to get the space — and fix the code that encodes twice.

Can I see the parameters of a long tracking URL?

Yes. Paste the full URL in Encode mode or its encoded form in Decode mode; the breakdown lists every query parameter, decoded, in a table.

Does it handle emoji?

Yes. Emoji use four UTF-8 bytes, so each becomes four %XX codes, and they decode back correctly.

Is my data sent anywhere?

No. Encoding and decoding run in your browser.

Is the URL Encoder free?

Yes. It is free, unlimited and needs no sign-up.

Make Any Text URL-Safe!

Encode, decode and inspect URLs instantly — free and private.

Explore More Prompt Minds Tools

URL Encoder / Decoder works great alongside our other free tools. Every Prompt Minds tool runs entirely in your browser — no sign-up, no uploads, no watermarks. Browse all free tools.

Prompt Minds AI Assistant
Namaste! How can I help you with URL Encoder / Decoder?