Bag tag · licence plate · claim stub
URL Encoder/Decoder
Paste a URL or any text. It is printed on a bag tag: the host becomes the destination code, the encoded string rides on the claim stub, and tearing the stub off puts it on your clipboard. Decode goes the other way.
Destination
EXA
example.com
Carrier
HTTPSGate
443Pcs
1/1Licence plate
0 001 000000
Passenger · path
/
Claim stub · encoded
URL or text to encode
Encoded
Routing · the URL taken apart
Percent-encoding, explained
A URL can only carry a small set of characters safely. Everything else, spaces, accents, ampersands inside a value, emoji, is written as a percent sign and the character's UTF-8 bytes in hex: a space is %20, an ampersand %26, é is %C3%A9. Encoding turns text into that form; decoding turns it back.
Which mode
Component is encodeURIComponent: it encodes everything that is not a letter, digit or one of - _ . ! ~ * ' ( ), which is right for a single value you are about to put into a query string. Whole URL is encodeURI: it leaves the structural characters : / ? # & = @ alone so a complete address stays an address. Form is what an HTML form sends: component encoding with spaces as +. Decoding reads all three; untick "read + as a space" if a literal plus was meant.
Why a bag tag
A bag tag is a URL for a suitcase: a destination code, a carrier, a routing, and a ten-digit licence plate in a barcode that every scanner on the way can read without understanding the rest. The claim stub is the copy you keep. Here the host becomes the destination, the scheme the carrier, the path the passenger name, and the stub carries the encoded string.
Why does my decoded text show HOLD?
The input has a percent sign that is not followed by two hex digits, or the bytes do not form valid UTF-8, so the browser refuses to decode it. Fix the sequence or encode the stray % as %25.
Should I encode the whole URL or just the value?
Just the value, with Component mode, then build the URL around it. Encoding a whole URL that already contains encoded values encodes the percent signs again (%20 becomes %2520).
Is anything uploaded?
No. Encoding and decoding happen in your browser with its own URL functions.