URL Encoder & Decoder

Encode and decode URLs and URI components — free, instant, no server

Text / URL to Encode
Encoded Output

How URL Encoding Works

Reserved characters

Characters like & = + # ? have special meaning in URLs. When used as data (not structure), they must be percent-encoded.

Percent encoding

Each unsafe byte is replaced with %XX where XX is the hex value. Space = %20, & = %26.

Query parameters

Always encode values in query strings. ?q=hello world should be ?q=hello%20world.

Frequently Asked Questions

URL encoding (percent-encoding) converts special characters into a format safe for URLs. Spaces become %20, ampersands become %26, and non-ASCII characters are represented as their UTF-8 bytes in hex.

encodeURI encodes a full URL, leaving structural characters like : / ? # & intact. encodeURIComponent encodes a single component value and also encodes those structural characters. Use encodeURIComponent for query parameter values.

In HTML form submissions (application/x-www-form-urlencoded), spaces are encoded as +. In proper percent-encoding, spaces are %20. Both are valid in different contexts. This tool uses %20 (encodeURIComponent).

encodeURIComponent('hello world & more')hello%20world%20%26%20more. To decode: decodeURIComponent(encoded).

Common Use Cases

API query parameters

When building an API request URL, any value in a query string must be URL-encoded. For example, a search term with spaces or special characters must be encoded before appending to ?q=.

Redirect URLs

When passing a URL as a parameter inside another URL (e.g., ?redirect=https://...), the inner URL must be fully percent-encoded so the outer URL parser sees it as a single value.

Non-ASCII characters

Accented letters, emoji, CJK characters and other Unicode must be encoded as their UTF-8 bytes in hex. For example, é → %C3%A9.

Encoding Quick Reference

Special characters

Space → %20   + → %2B   / → %2F   ? → %3F   # → %23   = → %3D. These must always be encoded when used as data values.

Safe characters

Letters (A–Z, a–z), digits (0–9), and the characters - _ . ~ are never encoded. Everything else is encoded as %XX using its UTF-8 byte value in hex.

Double encoding

If you encode a URL that already contains percent-encoded characters, each % gets encoded to %25. Always decode first, then re-encode if needed. This tool's decode mode handles this correctly.

Related Tools

Related Tools

Plus Signs Still Trip People

In 2026, the most common URL-encoding mistake is still treating "+" and "%20" as interchangeable everywhere. They are only equivalent in application/x-www-form-urlencoded data, such as HTML form submissions and many query-string builders. In path segments, signed URLs, OAuth callback values, and many API signature schemes, a literal plus must stay "+" or be encoded as "%2B"; decoding it to a space can break routing or invalidate signatures. If a token, email alias, or base64 value contains "+", verify whether your tool is applying form-style decoding.