URL Encode Text Online
URL encoding (also called percent encoding) converts characters that are not allowed in URLs into a safe format using % followed by the character's hexadecimal byte value. This is required when including spaces, special characters, or international text in URLs, query parameters, form submissions, and HTTP requests. Without proper URL encoding, characters like spaces, ampersands, equals signs, and slashes break URL parsing and cause incorrect behavior in web applications. This tool URL-encodes any text, converting all characters that need encoding while leaving safe characters (letters, digits, hyphens, underscores, tildes, periods) unchanged. The encoded result is safe to use anywhere in a URL structure. Everything runs in your browser so no data is transmitted.
FAQ
- What characters need to be URL encoded?
- Spaces, ! " # $ % & ' ( ) * + , / : ; = ? @ [ \ ] ^ ` { | } ~ and all non-ASCII characters must be percent encoded. Letters, digits, - _ . ~ are safe and left unchanged.
- What is the difference between encodeURI and encodeURIComponent?
- encodeURI leaves URL structural characters (/ ? # &) unchanged and is for encoding a full URL. encodeURIComponent also encodes those characters and is for encoding individual query parameter values.
- How are spaces encoded in URLs?
- Spaces are encoded as %20 (in strict percent encoding) or as + (in application/x-www-form-urlencoded format used in HTML forms). This tool uses %20 which is correct for URL paths and query values.