URL Encoder — Encode URLs and Query Strings Online
FreeEncode URLs and query parameters with percent-encoding. Handles special characters, spaces, and Unicode. Free, instant, runs in your browser.
What's next
Settings guide
Encoding scope:
- ·Encode component (recommended for parameters) — Encodes all characters that are not safe in a URL query value, including
&,=,+,?,#, and/. Use this when encoding a single query parameter value. Equivalent to JavaScript'sencodeURIComponent(). - ·Encode full URL — Encodes only characters not allowed anywhere in a URL, preserving structural characters like
://,/,?,&, and=. Use this when encoding an entire URL while preserving its structure. Equivalent to JavaScript'sencodeURI().
Space encoding:
- ·
%20— The RFC 3986 standard for spaces in URLs. Works everywhere. - ·
+— The older HTML form encoding standard for spaces. Accepted by some older form processors. Prefer%20for new code.
Format comparison
encodeURIComponent vs encodeURI in JavaScript: encodeURIComponent() encodes everything that is not a letter, digit, or one of - _ . ! ~ * ' ( ) — it is safe for encoding individual parameter values. encodeURI() preserves structural URL characters (://?&=#) and is used for encoding complete URLs. This tool maps to both modes.
URL encoding vs Base64 encoding: URL encoding keeps the content readable (spaces become %20, not unrecognisable characters). Base64 makes content unreadable but produces a compact, alphabet-restricted string. Use URL encoding for URL parameters; use Base64 when binary or arbitrary data must be embedded in text fields.
How it works
Identify safe characters
Letters (A–Z, a–z), digits (0–9), and a small set of unreserved characters (- _ . ~) are safe in URLs and pass through unchanged.
Convert to UTF-8 bytes
Each character that needs encoding is converted to its UTF-8 byte sequence. A single Unicode character may produce multiple bytes.
Percent-encode each byte
Each byte is written as % followed by two uppercase hexadecimal digits. A space (byte 0x20) becomes %20; an @ (byte 0x40) becomes %40.
Assemble output
The encoded string is assembled — safe characters unchanged, encoded characters as their %XX sequences. The result is a valid URL component safe for any HTTP request.
About this format
URLs can only contain a defined set of ASCII characters. Spaces, special characters, and non-ASCII Unicode must be percent-encoded — converted to `%XX` sequences where XX is the hexadecimal byte value — before they can appear in a URL without breaking the request.
The two most common encoding scenarios: encoding a query parameter that contains user input (a search term, an address, a name with accented characters), and encoding a full URL to embed it as a parameter inside another URL — such as a redirect target or a referral URL.
Paste your string or URL and the encoded version is produced immediately.