URL Encoder and Decoder
A free tool by DeepRit, a Google Ads agency that does PPC and nothing else. We build and run Google Ads accounts so every click is accounted for. Book a free audit call
Free URL encoder and decoder. Percent-encode text for links and query strings, encode a whole URL, or decode %20-style addresses back to text.
Free, no sign-up. Runs in your browser: nothing you type is uploaded or saved.
How to use the URL encoder
Paste your text or web address into the box and choose what to do:
- Encode for a link part or query value. Use this for a single piece that goes inside a URL: a search term, a campaign name, a file name, an email subject in a
mailto:link. Every character with a special meaning in URLs (such as&,=,?,/,#and spaces) is encoded. - Encode a whole URL. Use this for a complete address that contains spaces or non-English characters. The structure (
https://, slashes,?,&,=) is kept, and only characters that aren't allowed are encoded. - Decode. Turns percent-encoded text such as
caf%C3%A9%20menuback into readable text:café menu. Tick "treat + as a space" for text from web forms and query strings, which often use+for spaces.
The result appears instantly, ready to copy. The URL encoder works in your browser; nothing is uploaded.
What URL encoding is
Web addresses can only contain a limited set of characters: unaccented letters, digits and a few symbols. Some symbols also have special jobs: ? starts the query string, & separates parameters, = joins a name to a value, # starts a fragment, and / separates folders.
Percent-encoding (also called URL encoding) represents any other character as a % followed by two hexadecimal digits for each byte of the character in UTF-8. For example:
| Character | Encoded |
|---|---|
| space | %20 |
| & | %26 |
| = | %3D |
| ? | %3F |
| / | %2F |
| # | %23 |
| + | %2B |
| é | %C3%A9 (two bytes in UTF-8) |
| € | %E2%82%AC (three bytes) |
So "Crumb & Co. menu: café specials" encoded as a query value becomes Crumb%20%26%20Co.%20menu%3A%20caf%C3%A9%20specials.
Encoding a part versus a whole URL
The difference between the two encode options matters:
- A part (a query value or path segment) must have every special character encoded, otherwise it breaks the URL. If a campaign name contains
&and you don't encode it, everything after the&is read as a new parameter. - A whole URL already uses
/,?,&and=for their real jobs, so they must stay as they are. Only spaces and characters outside the allowed set are encoded.
In JavaScript terms, the first option is encodeURIComponent and the second is encodeURI. Use the first for pieces, the second for complete addresses that just need cleaning.
Example: the address https://a.com/menu page?item=café encoded as a whole URL becomes https://a.com/menu%20page?item=caf%C3%A9. Encoding it as a part would also encode ://, / and ?, which would break it as an address.
Spaces: %20 or +?
Both appear in the wild, which causes confusion:
%20is the standard encoding for a space anywhere in a URL.+means a space only in query strings submitted by HTML forms (theapplication/x-www-form-urlencodedformat). In a path,+is a literal plus sign.
When you encode, this URL encoder uses %20, which is safe everywhere. When you decode text that came from a form or a query string, tick "treat + as a space", or "a+b" will stay as "a+b".
When you need a URL encoder
- Building links with parameters by hand, such as search links, filter links or tracking parameters. For campaign tracking, the UTM builder encodes values automatically.
mailto:links with a subject or body, where spaces and line breaks must be encoded:mailto:[email protected]?subject=Order%20question.- Sharing links with non-English characters, which can break in some email clients and chat apps if not encoded.
- Reading messy tracking links: decoding shows what a long encoded address actually contains.
- Debugging redirects and APIs, where a value is encoded twice (
%2520instead of%20) or not at all. - Writing redirect rules with spaces or accents in old paths. The 301 redirect generator handles common cases.
Double encoding
A common bug is encoding something that's already encoded. A space becomes %20; encoding again turns the % into %25, giving %2520. Links with %2520 usually lead to "page not found" errors. If you see %25 followed by two digits in a URL, decode once and check whether the result is what you expected.
Decoding errors
Decoding fails when a % isn't followed by two valid hexadecimal digits, or when the bytes don't form a valid UTF-8 character. A lone % in "100% off" is a common cause. The URL encoder tells you when this happens and leaves the text unchanged, so you can find and fix the broken part, usually by encoding the % itself as %25.
URL encoding and SEO
Search engines handle encoded URLs correctly, but readable URLs are better for people. Prefer simple, lowercase, hyphenated addresses without spaces or special characters; the slug generator creates them from page titles. For sites in other languages, browsers show non-English characters in the address bar even though they're sent encoded, so either approach works for search. Be consistent: if the same page can be reached with and without encoding, set a canonical tag with the meta tag generator.
HTML entities are different
Percent-encoding is for URLs. In HTML, special characters are written as entities instead: & for &, < for <, for a non-breaking space. If you have HTML full of entities and want readable text, use the HTML to text converter, which decodes them.
Encoding in spreadsheets and code
If you need to encode many values at once, most tools have a built-in equivalent of this URL encoder:
- Excel (Windows) and Google Sheets:
=ENCODEURL(A2)encodes the text in a cell, like the "link part" option. It's handy for building hundreds of tracking or search links in a column. - JavaScript:
encodeURIComponent()for parts andencodeURI()for whole addresses;decodeURIComponent()to decode. - Python:
urllib.parse.quote()for parts (by default it keeps/, so passsafe=""to encode it too),urllib.parse.quote_plus()for form-style encoding with+, andurllib.parse.unquote()to decode. - PHP:
rawurlencode()uses%20for spaces, whileurlencode()uses+(form style).rawurldecode()andurldecode()reverse them.
The differences between these functions, mostly around spaces and slashes, are exactly why links built in different tools sometimes don't match. When in doubt, paste a sample into the URL encoder here and compare.
A worked example: a mailto link with a subject
You want a "Order by email" button that opens a new email with the subject "Saturday rye order & pickup time" and a first line already written. In the URL encoder, encode the subject as a link part to get Saturday%20rye%20order%20%26%20pickup%20time, and encode the body the same way. A line break in the body becomes %0A. The finished link is:
mailto:[email protected]?subject=Saturday%20rye%20order%20%26%20pickup%20time&body=Hi%2C%20I'd%20like%20to%20order%3A%0A
Without encoding, the & in the subject would end it early at "Saturday rye order", and the rest would be lost.
Quick reference
| You have | You want | Use |
|---|---|---|
| A value to put in a link | A safe query value | Encode for a link part |
| An address with spaces or accents | A working link | Encode a whole URL |
%20-style text |
Readable text | Decode |
Form data with + |
Readable text | Decode with "+ as a space" |
When organic traffic takes too long
SEO builds traffic over months. Google Ads puts you at the top of the results for the searches that matter this week. That is the whole job of DeepRit: a PPC-only agency that sets up and runs Google Ads accounts so every click is accounted for. You keep full ownership of your account, get a written report every week, and can stop at any time. See our pricing or ask for a free audit.
Frequently asked questions
What does %20 mean in a URL?
%20 is the percent-encoded form of a space. URLs can't contain literal spaces, so spaces are written as %20, or as + in form-encoded query strings.
What's the difference between encodeURI and encodeURIComponent?
encodeURI encodes a complete address and keeps characters like /, ? and & that structure it. encodeURIComponent encodes everything with a special meaning, for use inside one part such as a query value. In this URL encoder they're "Encode a whole URL" and "Encode for a link part".
Why does my decoded text show an error?
There's a % that isn't followed by two hexadecimal digits, or a broken byte sequence. A lone % in text like "100%" is the usual cause; it should be encoded as %25.
Should I encode spaces as + or %20?
Use %20. It's valid everywhere in a URL. + only means a space in form-encoded query strings.
Is URL encoding the same as encryption?
No. Encoding just represents characters in a URL-safe way and anyone can decode it. It provides no security.
Is the URL encoder free?
Yes. It's free with no sign-up, and everything runs in your browser, so the text and links you paste are never uploaded.
Free PPC audit
See where your ad budget leaks.
We look at your Google Ads account before the call, then walk you through what we'd fix first, in dollars. No obligation, no hard sell.