How to Encode and Decode a URL
Paste your text into the correct box
To encode, type or paste raw text into the "Plain URL / Text" box. To decode, paste an already percent-encoded string into the "URL Encoded" box. The tool reads from whichever box matches the action you choose, so put your input on the matching side.
Click Encode or Decode
Press Encode to convert reserved and unsafe characters into percent-encoded sequences using the browser native encodeURIComponent function. Press Decode to reverse the process with decodeURIComponent. The conversion runs instantly in your browser and the status line confirms success or reports an error.
Copy or clear the result
Use Copy Result to place the output on your clipboard for pasting into a query string, link, or config file. Use Clear to empty both boxes and the status message before starting a new conversion. Nothing is sent anywhere, so you can repeat as often as you need.
Encoding vs Decoding: What Each Direction Does
This tool performs full component-level percent encoding with encodeURIComponent and the matching decodeURIComponent. The table below shows how common characters are treated so you know what to expect before you convert.
| Character | Encoded Output | Why It Changes |
|---|---|---|
| space | %20 | Spaces are not allowed in a URL and must be escaped. |
| & (ampersand) | %26 | Reserved as a query parameter separator, so it is escaped inside a value. |
| = (equals) | %3D | Reserved as the key and value delimiter in query strings. |
| / (slash) | %2F | Encoded because component encoding escapes path separators too. |
| ? (question mark) | %3F | Reserved as the start of the query string. |
| letters, digits, - _ . ~ | unchanged | These are unreserved characters and are always left as is. |
When to Use This Tool
Building query string values
Encode a single parameter value such as a search term, email, or redirect URL before placing it after a key in a query string. Component encoding escapes &, =, and ? so your value cannot break the surrounding parameters.
Reading a long encoded link
Paste a percent-heavy URL from an email, redirect chain, or log into the encoded box and click Decode to see the human-readable original. This makes it easy to inspect where a tracking or redirect link actually points.
Handling non-ASCII text
Encode names, accents, or other Unicode characters so they travel safely as UTF-8 percent sequences. The tool uses the browser standard, so a single accented letter may expand into two or more percent groups.
Quick checks during development
Verify how a value will look in a request, fix a malformed link, or confirm a round trip by encoding then decoding. The instant browser-side conversion fits naturally into debugging and copy-paste workflows.
Common Problems and Fixes
Decoding shows an error message
decodeURIComponent fails when it meets a malformed sequence such as a lone percent sign or an incomplete code like %2 instead of %20. Check that every % is followed by two valid hexadecimal digits, remove stray % characters, then decode again.
My slashes and colons got encoded
This tool uses component encoding, which escapes / and : as %2F and %3A on purpose. That is correct for a single parameter value. If you wanted to keep a full URL structure intact, encode only the individual value rather than the whole address.
Plus signs are not becoming spaces
Percent encoding represents a space as %20, not as +. The + style belongs to form submission encoding. If your input used +, decode it, replace each + with a space manually, then re-encode if needed.
Copy button did nothing
Copying uses the browser clipboard API, which requires a secure context. Make sure you are on the https version of the page and that you produced an output first, then click Copy Result again or select the text and copy it manually.