URL Encoder & Decoder
Encode and decode URL text, as a component or a full URL — free, private and running entirely in your browser
Percent-encodes with Component or Full URL, or reads those sequences back. Opens on Encode and Component. The result waits about 80 milliseconds. Clear empties Input. Cmd/Ctrl+K does that only when focus is outside both text boxes.
Last updated: 11 October 2026
Guide, examples, and FAQ
About URL Encoder
What it does
Encode calls encodeURIComponent for Component and encodeURI for Full URL. Decode calls decodeURIComponent or decodeURI. Component percent-encodes : / ? # & = +. Full URL leaves : / ? # & = + @ $ , ; and encodes spaces plus characters encodeURI still changes. A space is %20 in both scopes, never +.
Who it is for
For a single query value, a path piece, or reading a percent-encoded address back.
When to use it
Pick Component before a value that contains & = ? or # is placed in a URL. Pick Full URL when the text is already a whole address and only spaces and non-ASCII characters should change.
Key features
Two scopes, one input
Reserved marks change in Component and stay in Full URL, including : / ? # & = +.
Encode or Decode
Only encodeURIComponent, encodeURI, decodeURIComponent, and decodeURI run.
A character count
A blank box shows Awaiting input. Output status is the JavaScript length, such as 21 chars.
How to use URL Encoder
- 1Stay on Encode or switch to Decode, then pick Component or Full URL. A reload returns to Encode and Component.
- 2Paste into Input and wait about 80 milliseconds. Cmd/Ctrl+K does not clear while the cursor is in either box.
- 3Read a character count, Awaiting input, or URI malformed, then Copy output or download url.txt or decoded.txt.
Example
Before
a b&c=d?e#f
After
a%20b%26c%3Dd%3Fe%23f
Component writes 21 characters, so the status reads 21 chars. Full URL writes a%20b&c=d?e#f, 13 characters. https://example.com/a b?x=1&y=2#frag becomes https%3A%2F%2Fexample.com%2Fa%20b%3Fx%3D1%26y%3D2%23frag in Component (56) and https://example.com/a%20b?x=1&y=2#frag in Full URL (38).
Benefits
A query value stays one value
Component turns & = ? # into %26 %3D %3F %23. Full URL leaves them, so the value splits across parameters.
next= can hold a whole address
Component-encode the search address before it is placed after next=. Component Decode returns that address.
Common use cases
A search value with & and Hindi
chai & नाश्ता is 13 JavaScript characters. Component writes chai%20%26%20%E0%A4%A8%E0%A4%BE%E0%A4%B6%E0%A5%8D%E0%A4%A4%E0%A4%BE (67). Full URL writes chai%20&%20%E0%A4%A8%E0%A4%BE%E0%A4%B6%E0%A5%8D%E0%A4%A4%E0%A4%BE (65), and the ampersand still starts another parameter.
That search address passed as next
https://shop.example/go?next=https%3A%2F%2Fexample.com%2Fsearch%3Fq%3Dchai%20%26%20%E0%A4%A8%E0%A4%BE%E0%A4%B6%E0%A5%8D%E0%A4%A4%E0%A4%BE is the Component spelling of https://example.com/search?q=chai & नाश्ता placed after next=. Pasting the encoded value into Decode, Component, returns that search address.
Tips & best practices
- café, a space, and a grinning emoji encode to caf%C3%A9%20%F0%9F%98%80 in both scopes, status 24 chars. Component Decode shows 7 chars, because that emoji counts as two JavaScript characters.
Common mistakes to avoid
- Component on a whole address. https:// becomes https%3A%2F%2F, so the browser will not open that page.
- Full URL on a value that contains & = ? or #. Those marks stay, so a b&c=d?e#f still splits.
- Encoding twice. a%20b becomes a%2520b in both scopes. Already-encoded text is not detected.
- Expecting + to mean a space. Decode of a+b stays a+b in both scopes. A space encodes as %20. Component encodes + as %2B, and Full URL leaves +.
Frequently asked questions
Which function runs in each scope?
Component uses encodeURIComponent or decodeURIComponent. Full URL uses encodeURI or decodeURI. On a b&c=d?e#f those writes are a%20b%26c%3Dd%3Fe%23f and a%20b&c=d?e#f.
Why does %23 stay %23 in Full URL?
decodeURI keeps reserved characters encoded. Component Decode turns %23 into #. %3A, %2F, %3F, %26, %3D, and %2B stay encoded in Full URL too. %20 becomes a space in both. Component Decode of https%3A%2F%2Fexample.com%2Fa%20b returns https://example.com/a b. Full URL Decode returns https%3A%2F%2Fexample.com%2Fa b.
What does a bad percent sequence show?
%, %ZZ, and %E0%A4%A each show URI malformed in both scopes, and the output is cleared.
Will a plus sign be read as a space?
No. Both decode functions return a+b unchanged. This page never applies form encoding.
What if a%20b is encoded again?
Both scopes write a%2520b. Nothing detects a percent sequence that is already there.
How are café and an emoji encoded?
The café line is UTF-8 percent bytes in both scopes, not an HTML entity or a JSON \u escape.
Does any of this text leave the browser?
No. Processing stays in the page. The session stores the input under url-encoder and drops it on a full reload. Mode and scope reopen as Encode and Component.
Does the page split a query or test the result?
No. It does not parse fields, write Base64 or HTML entities, or check that the output is an address a browser can open.
When another tool fits better
- JSON Escape. The text must sit inside a JSON string, which wants backslash escapes rather than %20.
- Base64 Encoder. A file or a request header needs Base64, not a %20 sequence.
Conclusion
Component percent-encodes with encodeURIComponent so one value stays one value. Full URL uses encodeURI so : / ? # & = stay in place.
Ready to try URL Encoder?
Scroll back up to start now, or continue with another free developer tool.