URL Encoder / Decoder
Encode text into URL-safe percent-encoding, or decode encoded URLs back to readable text. Supports component and full-URL modes, with live conversion.
Convert text and URLs to and from percent-encoding. Choose encode or decode, pick the encoding scope, and the result updates instantly. Everything runs in your browser.
What is a URL Encoder?
A URL encoder (or percent-encoder) converts characters that aren't allowed in a web address into a safe format that browsers and servers can transmit correctly. URLs can only contain a limited set of characters, so spaces, accented letters, symbols, and many punctuation marks must be "percent-encoded" — replaced with a % sign followed by their hexadecimal code. This tool encodes text into URL-safe form and decodes encoded URLs back into readable text, in both directions, instantly.
It's an everyday utility for web developers, who constantly work with query strings, form data, API requests, and links containing special characters. Encoding ensures that data passed in a URL arrives intact, without breaking the address or being misinterpreted.
How Does URL Encoding Work?
Each character that isn't permitted in a URL is replaced by a percent sign followed by the two-digit hexadecimal value of its byte. Spaces, for example, become %20. Characters outside basic ASCII (like accented letters or emoji) are first encoded as their UTF-8 bytes, each then percent-encoded.
space → %20
& → %26
? → %3F
= → %3D
é → %C3%A9 (two UTF-8 bytes)
"a b&c" → "a%20b%26c"
How to Use This URL Encoder
Choose Encode to convert text into percent-encoding, or Decode to convert an encoded URL back to readable text. When encoding, pick the scope: "Component" encodes every special character (best for query-string values and form data), while "Full URL" preserves the structural characters like : / ? & = so a whole URL stays valid. Type or paste your text and the result appears instantly — copy it with one click.
Component vs Full-URL Encoding
This distinction matters. Component encoding (encodeURIComponent) encodes everything that isn't a basic letter, digit, or a few safe symbols — including / ? & = — which is exactly what you want for a single value going into a query string, because those characters would otherwise be misread as URL structure. Full-URL encoding (encodeURI) leaves the structural characters intact, so you can encode a complete URL that contains spaces or accents without breaking its https://, path separators, or query markers.
Common Encoded Characters
| Character | Encoded | Character | Encoded |
|---|---|---|---|
| (space) | %20 | & | %26 |
| ? | %3F | = | %3D |
| # | %23 | / | %2F |
| + | %2B | @ | %40 |
| : | %3A | % | %25 |
Why is URL Encoding Needed?
URLs have a defined syntax where certain characters have special meaning: ? starts the query string, & separates parameters, = assigns values, / separates path segments, and # marks a fragment. If your data contains these characters literally — say a search for "fish & chips" — they'd be misinterpreted as URL structure, breaking the request. Encoding replaces them with their percent codes so they're treated as data, not syntax. The same applies to spaces and any non-ASCII characters.
When Developers Use URL Encoding
- Query strings: safely passing search terms, filters, and parameters in a URL.
- Form submissions: form data sent via GET is URL-encoded.
- API requests: encoding parameters and values so they transmit correctly.
- Links with special characters: sharing URLs that contain spaces, accents, or symbols.
- Redirect URLs: embedding one URL inside another as a parameter (requires component encoding).
What is the Difference from HTML Encoding?
URL encoding and HTML encoding solve different problems and aren't interchangeable. URL encoding makes data safe to put in a web address using percent-codes (%20). HTML encoding makes characters safe to display in a web page using entities (like & for &), preventing them from being parsed as HTML tags. If you're building a link, use URL encoding; if you're inserting text into page content, use HTML encoding. Mixing them up leads to characters showing incorrectly or security issues.
Frequently Asked Questions
Explore All NerdyTools By Categories
Find the right tool for any task — free, fast, and no sign-up required
