How do I encode text for a URL?
Type or paste your text and click Encode (component). This free URL encoder converts every character that is not safe in a URL into percent-encoding: a % sign followed by two hexadecimal digits. For example, “hello world & friends?” becomes hello%20world%20%26%20friends%3F, because a space becomes %20, an ampersand becomes %26 and a question mark becomes %3F. Use component encoding for individual query values, path segments and form fields. If you have a complete address and only want the unsafe characters fixed while keeping the : / ? &=punctuation that gives the URL its structure, use Encode (full URL) instead: https://example.com/a b?x=1&y=2 becomes https://example.com/a%20b?x=1&y=2. Text is encoded as UTF-8, so Urdu, Arabic, Chinese and emoji produce correct multi-byte sequences.
How do I decode a URL?
Paste the encoded text and click Decode. Percent sequences are converted back to the original characters, and plus signs are turned back into spaces, matching how HTML form data (application/x-www-form-urlencoded) encodes spaces. So hello%20world%20%26%20friends%3F decodes to “hello world & friends?” and a+b decodes to “a b”. If the input is not valid percent-encoding (a % not followed by two hex digits, or a truncated UTF-8 sequence), the tool shows a clear error instead of garbled output. Decoding is the fastest way to read tracking links, redirect URLs, API request strings and analytics parameters, and to check exactly what data a link is carrying before you share or click it.
Component encoding vs full URL encoding: which do I need?
They answer different questions. Component encoding (JavaScript encodeURIComponent) encodes everything except letters, digits and the marks - _ . ! ~ * ' ( ). Use it whenever a piece of text becomes one part of a URL: a search term in ?q=, a file name in a path, a redirect target, a UTM value. If you skip it, an & in your text would be read as a new parameter and a ? as the start of the query string. Full URL encoding (encodeURI) assumes the input is already a complete URL and leaves the structural characters : / ? &=# @ etc. alone, encoding only spaces, quotes, angle brackets and non-ASCII characters. Use it to clean up a pasted address. The classic bug is using full encoding on a component: the & in a user value then splits your query string. When in doubt, encode components separately and join them with the punctuation yourself.
Which characters must be encoded in a URL?
URLs may only contain a limited set of ASCII characters. Unreserved characters (letters, digits, hyphen, underscore, dot and tilde) never need encoding. Reserved characters (: / ? # [ ] @ ! $ & ' ( ) * + , ;=) have structural meanings and must be encoded when they appear as data rather than structure. Everything else (spaces, quotes, angle brackets, braces, backslash, and all non-ASCII text) must be percent-encoded as UTF-8 bytes. A space is the famous case: %20 in URLs generally, but + in form-encoded query data, which is why decoders accept both. Encoding more than necessary is safe (decoders restore it), but encoding structural characters in a full URL breaks it, and double-encoding (encoding an already encoded % into %25) is a common bug: if your output shows %2520, the input was encoded twice.
When do I need URL encoding in practice?
Every day in web work: building API requests with user input, creating share links with titles and text, adding UTM parameters to campaign URLs, linking to files with spaces or non-English names, passing redirect targets after login, and debugging why a link breaks in email or chat. Email and messaging apps are strict: a raw space or ampersand can truncate a link, so encoded links survive copy-paste. Search engines also read encoded URLs; readable slugs are better for SEO, but special characters in parameters should always be encoded. A good habit is to encode at the last moment, when assembling the final URL, and decode when displaying or logging it, so stored data stays clean and human-readable.
Is it free and private?
Yes. The URL encoder and decoder is free, with no signup, no account and no limits. Conversion runs in your browser, so URLs and text you paste are never sent to a server, stored or logged, and they disappear when you close or reload the tab. That matters for links containing tokens, email addresses or private parameters. Character counts under the output show the size change in both directions, which helps spot double-encoding. For bulk work inside your own code, use the built-ins: encodeURIComponent and decodeURIComponent in JavaScript, urllib.parse.quote in Python, or urlencode in PHP. For quick one-off checks while building links, debugging requests or reading encoded strings, this page encodes and decodes instantly with correct UTF-8 handling.