Encode text to UTF-8 percent-encoding (URL encoding) or decode percent-encoded strings back to readable text. Essential for working with URLs, APIs and web development.
Type or paste the text you want to encode or decode into the Input box on the left.
Click the Encode button to convert your text, or Decode to reverse the process. Results appear instantly in your browser with no data sent to any server.
Click Copy Result to copy the output to your clipboard. Use Swap to move the output back to the input box for chained encoding operations.
UTF-8 is a variable-width character encoding standard that can encode all valid Unicode code points. It uses 1 to 4 bytes per character. ASCII characters (0-127) use 1 byte in UTF-8, making UTF-8 backward-compatible with ASCII. UTF-8 is the dominant character encoding on the web, used by over 98% of websites globally.
URL encoding converts characters that are not allowed in URLs into a format that can be transmitted over the web. Each character is replaced with a percent sign followed by its hexadecimal UTF-8 byte value. For example, a space becomes %20 and an ampersand becomes %26. This tool performs URL encoding and decoding on any text you provide.
URL encoding is needed when including special characters in query strings, form data or API requests. For example, if a search query contains spaces or special characters, they must be encoded before being included in a URL. Without encoding, the server may misinterpret the URL structure. Browsers and most HTTP libraries handle this automatically, but manual encoding is sometimes needed in scripts or API integrations.
Characters that must be encoded in URLs include spaces (as %20), and symbols like !, @, #, $, %, ^, &, *, (, ), =, +, [, ], {, }, |, backslash, colon, semicolons, quote marks, commas, and question marks. Letters (A-Z, a-z), digits (0-9), and the characters - _ . ~ are considered safe and do not need encoding.
encodeURI encodes a complete URL and leaves characters like slash, question mark, hash and ampersand unencoded as they are valid URL structural characters. encodeURIComponent encodes a URL component such as a query parameter value and encodes all special characters including slashes and ampersands. For encoding individual parameter values, always use encodeURIComponent. Our tool uses encodeURIComponent-style encoding.
Unicode is a standard that assigns a unique number (code point) to every character across all writing systems. UTF-8 is one of several encoding schemes that implements Unicode and defines how those code points are stored as bytes. Other Unicode encodings include UTF-16 and UTF-32. UTF-8 is preferred on the web because it is compact for English text and fully compatible with ASCII.
Characters appearing as question marks or boxes indicate a character encoding mismatch where the text was encoded in one encoding such as Windows-1252 but interpreted as another such as UTF-8. This is called mojibake. To fix it, you need to know the original encoding and convert properly. Our tool works with standard UTF-8 encoded text.
Both are text encoding methods but for different purposes. Base64 converts binary data to ASCII text (increasing size by 33%) for transmitting binary content in text contexts. URL encoding converts special characters to percent-encoded format for safe inclusion in URLs. They are not interchangeable as Base64 encoded data still contains + and / characters that would need URL encoding if placed in a URL.