URL Encoder
Percent-encode text for URLs instantly. Switch between encodeURIComponent and encodeURI modes, see live output and copy the result. Free URL encoder.
What is the URL Encoder?
The ByteTools URL Encoder converts text into percent-encoded form so it can travel safely inside a URL.
- encodeURIComponent and encodeURI modes
- Live output as you type
- UTF-8 aware — emoji and international text encode correctly
- One-click copy
- Explains which mode to use and when
- 100% client-side and free
How to use the URL Encoder
- 1
Paste or type the text or URL you want to encode.
- 2
Pick a mode: 'Component' (encodeURIComponent) for values, 'Full URL' (encodeURI) for complete addresses.
- 3
Read the live percent-encoded output below.
- 4
Click Copy to put the encoded string on your clipboard.
About the URL Encoder
The ByteTools URL Encoder converts text into percent-encoded form so it can travel safely inside a URL. Spaces become %20, ampersands become %26, and multibyte characters like emoji are encoded as their UTF-8 byte sequences — exactly what browsers and servers expect.
Choose between two modes: encodeURIComponent escapes every reserved character and is right for query-string values, form data and path segments, while encodeURI preserves URL structure characters like :, /, ? and & and is right for encoding a complete URL. The output updates live as you type.
Encoding runs entirely in your browser — nothing is sent to a server, so internal links, API keys in query strings and private data stay on your machine.
Frequently asked questions
What is the difference between encodeURI and encodeURIComponent?
encodeURIComponent escapes every reserved character including /, ?, & and =, so use it for individual values like a query parameter. encodeURI leaves those structural characters alone, so use it only when encoding a complete URL whose structure must survive.
When should I URL-encode text?
Whenever user data goes into a URL: query-string values, path segments, redirect targets, mailto links and form submissions. Unencoded special characters can break the URL, change its meaning, or open injection issues.
Why does a space become %20 and not +?
%20 is the standard percent-encoding for a space in URLs. The + convention only applies inside application/x-www-form-urlencoded form data, such as query strings submitted by HTML forms. encodeURIComponent always produces %20, which is safe in both contexts.
How are emoji and non-English characters encoded?
They are first converted to UTF-8 bytes, then each byte becomes a %XX escape. For example é becomes %C3%A9 and the grinning-face emoji becomes %F0%9F%98%80. Every standards-compliant server decodes these back to the original characters.
Can URL encoding be reversed?
Yes — percent-encoding is fully reversible with decodeURIComponent. Use our URL Decode tool to turn %XX sequences back into readable text.
Guides for URL Encoder
Related tools
URL Decoder
Decode percent-encoded URLs back to readable text instantly. Optional '+ as space' handling for query strings and clear errors for malformed input.
Base64 Encoder
Encode text or files to Base64 instantly in your browser. UTF-8 safe, with a URL-safe Base64 option, copy and download. Free online Base64 encoder.
Slug Generator
A free online slug maker that turns any title into a clean, SEO-friendly URL slug: lowercase, accents removed, words joined by hyphens. Live preview and copy.
HTML Formatter
Format HTML online with clean, consistent indentation. This HTML formatter handles void elements and preserves pre, script and style exactly. Free and private.