✓ Whole URL: :// ? & = and # kept, spaces and other characters encoded
| Protocol | https |
|---|---|
| Host | cromagnon.app |
| Path | /search |
| ?q | pdf tools |
| ? forms | — |
| ?lang | en |
| ?page | 2 |
| # | results |
About the URL Encoder & Decoder
Encode text so it's safe inside a web address, or decode an encoded link back into words. Choose whether you're encoding a whole URL, a single value for a query string, or form data, and see any link broken down into its protocol, host, path and each query parameter, decoded.
How to use it
- Choose Encode or Decode.
- When encoding, pick Whole URL, One value (query parameter) or Form data (+ for spaces).
- Paste the text or the link. The result appears on the right, and a full URL is split into its parts underneath.
- When decoding, tick + means a space for form data. Copy or download the result.
Tip: Encoding a whole link as One value turns https:// into https%3A%2F%2F. That's right only when the link itself goes inside another URL, for example as a redirect=… parameter.
Which kind of encoding do you need?
The sample shows why it matters: in ?q=pdf tools & forms the & ends the value early, so the parts table shows a separate “ forms” parameter. Encode the value on its own (pdf%20tools%20%26%20forms) and it stays in one piece.
- Whole URL
- You have a full address with spaces or non-English letters in it. :// / ? & = and # are kept, everything else that isn't allowed in a URL is encoded. A space becomes %20.
- One value (query parameter)
- You're putting one piece of text into a URL, such as a search term after ?q=. Here & = ? / and # are encoded too, so they can't break the URL apart.
- Form data
- The same as One value, but spaces become +, the way HTML forms send data (application/x-www-form-urlencoded).
How percent-encoding works
A URL may only contain a small set of characters. Everything else is written as % followed by two hex digits for each byte of the character in UTF-8. A space is one byte, %20. The letter é is two bytes, %C3%A9. Arabic, Urdu, Chinese and emoji take two to four bytes each, so one letter can become several %XX codes.
Letters A–Z and a–z, digits and - _ . ~ never need encoding.
Decoding safely
- A stray % is kept
- Text like “100% sure” isn't a broken code; the % is left as it is and reported, instead of the whole decode failing.
- Encoded twice
- If the result still contains %20 or %3A, the text was encoded twice (%2520). The tool tells you; paste the result and decode again.
- + or %2B
- In form data and many query strings + means a space; a real plus sign is sent as %2B. Untick + means a space when decoding a path, where + is just a plus.
Reading a URL's parts
Any full link (starting with https:// or another scheme) is broken down into protocol, host, port, user, path, each query parameter (decoded, in order, including repeats like x=1&x=2) and the #fragment. It's the quickest way to read a long tracking link, check UTM tags, or see what a redirect really points to.
Characters you'll see encoded most
- %20
- space
- %26
- & (ampersand), which would otherwise start a new parameter
- %3D
- = (equals)
- %3F
- ? (question mark)
- %2F
- / (slash)
- %23
- # (hash), which would otherwise start the fragment
- %25
- % itself
- %2B
- + (plus), so it isn't read as a space
Tips and tricks
Paste a campaign link to see utm_source, utm_medium and utm_campaign decoded in the parts table.
Encode as Whole URL to turn a pasted address with spaces into one that works everywhere.
Encode each value as One value, then join them with & yourself.
Decode a link from an email or ad to see the real destination inside redirect= or url=.
Domains and paths in Urdu, Arabic or Chinese are encoded as UTF-8, which every browser understands.
Links with tokens or personal data are decoded on your device and never sent anywhere.
Questions
When do I need to encode a URL?
Whenever a value inside a link contains spaces, &, ?, =, # or non-English letters, for example a search term in ?q=…
What is the difference between encodeURI and encodeURIComponent?
encodeURI (Whole URL here) keeps the characters that give a URL its structure; encodeURIComponent (One value) encodes them too, for a single piece of text.
Why is a space sometimes + and sometimes %20?
HTML forms send spaces as +; everywhere else in a URL a space is %20. Choose Form data or tick + means a space to match.
Why does my decoded text still have %20 in it?
It was encoded twice. Decode the result once more.
Can it decode Arabic, Urdu or emoji in URLs?
Yes. Sequences such as %D8%B3 are read as UTF-8 and shown as the real letters.
What does %2F mean?
It's an encoded slash (/). Inside a single value it must be encoded so it isn't read as a new part of the path.
Is URL encoding the same as encryption?
No. Anyone can decode it; it only makes text safe to put in a link.
What is the difference between encodeURI and encodeURIComponent?
encodeURI is for a whole address: it leaves characters such as : / ? & = and # alone because they give the URL its shape. encodeURIComponent is for one piece, like a search term, and encodes those characters too. In this tool, Whole URL works like encodeURI and One value works like encodeURIComponent.
Why does my link break when it contains an & or #?
An & starts a new query parameter and a # starts the fragment, so a value containing them is cut short. Encode the value on its own with One value: & becomes %26 and # becomes %23, and the link arrives complete.
Can I decode a URL that has non-English characters?
Yes. Arabic, Chinese, accented letters and emoji are stored as several %XX bytes in UTF-8, and decoding turns them back into the original characters.
Is my code uploaded?
No. The tool runs in your browser; what you paste never leaves your device and nothing is stored on a server.
Related tools
Updated