URL encoder and decoder
Percent-encode and decode text, with the component-vs-full-URI distinction made explicit — the difference that decides whether your slashes and ampersands survive.
Component or full URI — pick the wrong one and it breaks
This is the entire subject. Component encoding escapes / ? & = # : along with everything else, because those characters are structural: a slash inside a query value is data, and leaving it literal is how a value ends up parsed as a path.
Full-URI encoding leaves those characters alone, because in a whole URL they are doing their structural job. Use it to make an already-assembled URL safe to transmit.
The rule of thumb: encoding one piece you are about to put into a URL is component encoding. Encoding a URL you already have is full-URI encoding.
Double encoding
Encoding an already-encoded string turns %20 into %2520, and the reader gets a literal "%20" in their data. If a decode here produces something that still contains percent escapes, you are looking at a double-encoded value — decode it twice.
Characters that are never escaped
A–Z a–z 0–9 - . _ ~ are the unreserved set and stay literal in every mode. An encoder that escapes them is producing valid but noisy output; normalization will decode them again.
Related tools
- URL-safe Base64 encoderEncode and decode URL-safe Base64 (RFC 4648 §5): -_ instead of +/, no padding. Handles emoji and every other character atob() refuses outright.
- URL parser and validatorBreak a URL into scheme, host, port, path, query and fragment, and see why an invalid one is invalid. Handles IDN hosts, repeated parameters and odd schemes.
- Text fragment link builderLink to an exact sentence on any page with #:~:text=. Paste the passage, get a link that scrolls to it and highlights it — no anchor needed on the page.