Encode or decode URLs and URI components instantly
encodeURIComponent encodes all special characters. encodeURI preserves URL structure characters (:, /, ?, #, etc.).
This tool percent-encodes and decodes URL text so it can travel safely inside a web address. It handles reserved and unsafe characters such as spaces, ampersands, question marks, slashes, and non-ASCII (UTF-8) characters, converting them into %XX escape sequences (for example a space becomes %20 and an ampersand becomes %26).
Developers and QA engineers use it when building query strings, debugging API requests, escaping values for redirect parameters, or reading back an encoded URL from a log file. It supports both component encoding (like JavaScript's encodeURIComponent, which escapes &, =, ?, and /) and full-URI encoding (like encodeURI, which preserves reserved characters that separate URL parts).
URLs may only contain a limited set of ASCII characters. Percent-encoding (defined in RFC 3986) replaces any character outside that safe set with a percent sign followed by two hexadecimal digits representing the byte value. A space is 0x20, so it becomes %20; the @ symbol is 0x40, so it becomes %40. Non-ASCII characters are first encoded to UTF-8 bytes, then each byte is percent-escaped, which is why an accented letter can expand into two or more %XX pairs (for example e-acute becomes %C3%A9).
The key distinction is between reserved characters that structure the URL (: / ? # [ ] @ ! $ & ' ( ) * + , ; =) and the data you place inside those slots. Component mode escapes reserved characters so a value like name=John & Jane survives intact as a single parameter (name%3DJohn%20%26%20Jane), while full-URI mode leaves the structural separators alone so the overall address still parses. Choose component mode when encoding an individual query value and full-URI mode when encoding a complete link.
Component encoding escapes reserved characters such as &, =, ?, and /, so it is safe for a single query-string value or path segment. Full-URL encoding leaves those separators intact so the overall address structure is preserved; use it on a complete URL rather than an isolated value.
In the path and standard percent-encoding, a space is %20. The plus sign is only used for spaces inside application/x-www-form-urlencoded form data, which is the older query-string convention. This tool uses %20 for standard percent-encoding; decode both %20 and + when reading form-submitted data.
They are first converted to their UTF-8 byte sequence, then each byte is percent-escaped. That is why one visible character can produce several %XX pairs, such as %C3%A9 for e-acute or a four-byte sequence for an emoji.
Decoding fails when the input has a malformed escape, such as a % not followed by two valid hex digits, or when the bytes do not form valid UTF-8. Check for truncated sequences or text that was double-encoded (encoded twice), which needs to be decoded twice.
Yes, it is completely free with no sign-up. All encoding and decoding runs locally in your browser using standard JavaScript URI functions, so the text you paste is never uploaded to a server.
Be careful: encoding an already-encoded string double-escapes it, turning %20 into %2520. If you are unsure, decode first to get clean text, then encode once for the exact context you need.
The unreserved set stays as-is: letters A to Z and a to z, digits 0 to 9, and the four marks hyphen, underscore, period, and tilde (- _ . ~). Everything else is escaped in component mode.