URL encoder & decoder
What the URL encoder and decoder does
This tool takes one box, not two. Paste plain text and it encodes it, converting spaces, ampersands, question marks and other characters that aren't safe in a URL into percent-encoded bytes. Paste something that already looks percent-encoded, containing a sequence like %20 or %3D, and it decodes it back into readable text instead.
It runs entirely in your browser. Nothing is uploaded, there's no account, and there's no limit on how much you convert or how often you come back.
The problem
Why some characters can't go straight into a URL
A URL has a small alphabet of characters that are safe to use unescaped: letters, digits, and a handful of punctuation marks like hyphen, underscore, period and tilde. Everything else, a space, an ampersand, a question mark inside a value rather than marking the query string, any non-ASCII letter, has to be represented as a percent sign followed by two hex digits, or it risks being misread as part of the URL's own structure rather than as data inside it.
This matters most in a query parameter: a search term with a space, an email address used as a value, a title with an ampersand in it, all need encoding before they can safely ride inside a link.
How it works
How to encode or decode a URL in three steps
There's only one box, and the tool decides which direction to run automatically.
- Step 1
- Paste the text or URL you want to convert into the input box.
- Step 2
- Press Convert. If the input already looks percent-encoded, it's decoded. Otherwise, it's encoded.
- Step 3
- Copy the result from the output box on the right.
What changes
What actually gets encoded, and what doesn't
Letters, digits and a small set of characters considered safe are left exactly as they are. Everything else, spaces, ampersands, question marks, colons, slashes, and any accented or non-Latin character, is converted to one or more percent-encoded bytes.
A space becomes %20. An ampersand becomes %26. A letter with an accent, or a character from a non-Latin script, becomes several percent-encoded bytes, since it's represented in more than one byte to begin with.
Why it matters
What an unencoded value actually breaks
An ampersand inside a query parameter's value, left unencoded, gets read as the start of the next parameter instead of as part of the value, silently truncating or corrupting the data. A space left as a literal space can break a URL entirely depending on where it's used, since URLs are not supposed to contain raw spaces at all.
Decoding has its own failure mode: pasting text that isn't validly percent-encoded, a stray percent sign not followed by two hex digits, produces an error rather than a guess, since there's no safe way to decode a malformed sequence.
Straight answer
How does it know whether to encode or decode?
It looks for a percent sign followed by two hex digits, the pattern that only shows up in already-encoded text. If it finds one, it decodes. If it doesn't, it assumes you're starting from plain text and encodes it.
This means a string that happens to contain a percent sign followed by two digits that aren't hex, or a coincidental letter pair, could be misread. If the result looks wrong, that's the thing to check first.
A string that mixes encoded and unencoded segments, part of a URL already percent-encoded and part still plain, is where this matters most. The tool makes one decision for the whole input rather than per segment, so a partially encoded string with any valid percent-encoded run in it is decoded as a whole, which can leave an already-plain portion looking untouched or, if it happens to contain a coincidental percent-hex pattern, decoded when it shouldn't be.
In practice
Who uses the URL encoder and decoder, and when
Developers use it to build a query string by hand, encoding a search term or a redirect URL before dropping it into a link, and to decode a URL pulled from server logs or a browser's address bar back into something readable.
Anyone debugging a broken link with unexpected characters in it uses it to see exactly what a percent-encoded sequence actually represents, rather than guessing from the raw bytes.