URL Encoder
Convert text into a form that is safe to place in a URL. Special characters, spaces and non-English letters are replaced by percent sequences such as %20 or %C3%A9, using UTF-8. Pick the mode that matches where the text will go: a single value, a complete address, or an HTML form body.
Encode Text for a URL
Encoded result
Details
How to Use the URL Encoder
- Enter or paste the text you want to encode.
- Choose a mode: Component for one parameter value, Full URL to keep the URL structure, or Form for form data.
- Optionally tick strict RFC 3986, keep existing %XX sequences, or encode line by line.
- Press Encode and copy the result.
About This Tool
Developers building query strings, API requests and redirect links, marketers writing campaign URLs, and anyone whose link breaks because of spaces, ampersands or accented characters.
Input: Plain text or URL · Output: Percent-encoded text.
Features and Limitations
Features
- Three modes: encodeURIComponent, encodeURI and form-encoding with + for spaces.
- UTF-8 safe, including emoji and non-Latin scripts.
- Optional strict RFC 3986 output and protection against double encoding.
- Line-by-line mode for lists of values.
- Works offline once the page has loaded.
Limitations
- Encoding a complete URL in Component mode also escapes its slashes and colons, which breaks the link; use Full URL mode for whole addresses.
- Full URL mode does not escape characters that have a meaning in URLs (for example &, = and #), so it cannot protect a value that contains them.
- Text containing unpaired surrogate characters cannot be converted to UTF-8 and is rejected with a message.
- Internationalised domain names (punycode) are not converted; only the text is percent-encoded.
- Results are computed in your browser; nothing you enter is sent to a server.
Example
café & crème in Component mode becomes
caf%C3%A9%20%26%20cr%C3%A8me. In Form mode the
spaces become + instead: caf%C3%A9+%26+cr%C3%A8me.
Frequently Asked Questions
What is the difference between Component and Full URL mode?
Component mode escapes everything except letters, digits and - _ . ! ~ * ' ( ). Full URL mode additionally leaves ; , / ? : @ & = + $ # alone so an address keeps its structure.
When should spaces be %20 and when +?
%20 is correct everywhere in a URL. A + means a space only in the query string of HTML form submissions (application/x-www-form-urlencoded), so use Form mode only for that.
Why do I see %25 in my result?
The text already contained a percent sign, for example from a previous encoding. Tick “Keep existing %XX sequences” to avoid double encoding.
Is the encoding UTF-8?
Yes. Characters outside ASCII are converted to their UTF-8 bytes and each byte is written as %XX, for example é becomes %C3%A9.
Is my text sent to a server?
No. Encoding runs in your browser.
Related Tools
More like this: all Encoding & Security tools, all Developer & Web tools or the TinySandy home page.