URL Encode / Decode
Percent-encode text for safe use in a URL, or decode an encoded URL back to readable text — both directions, live as you type.
1,044 views
Could not decode — invalid percent-encoding sequence.
How It Works
A URL can only safely carry a small alphabet: letters, digits, and the four unreserved symbols - _ . ~. Everything else gets rewritten as a %XX triplet, where XX is the hexadecimal value of the character's byte — this is RFC 3986 percent-encoding. Characters that structure a URL (? # / : @ & =, the "reserved" set) get encoded too whenever they appear inside a value rather than as delimiters, since a literal & inside a query value would otherwise be read as the start of the next parameter.
Non-ASCII text is encoded byte by byte, not character by character: the tool converts your string to UTF-8 first, then hex-encodes each resulting byte. The Turkish letter "ç" is two UTF-8 bytes (0xC3 0xA7), so it becomes two percent blocks, %C3%A7 — not a single code. A concrete example: encoding İstanbul çayı & simit produces %C4%B0stanbul%20%C3%A7ay%C4%B1%20%26%20simit. Notice the space becomes %20, the reserved & becomes %26, and each accented letter expands into its own multi-byte sequence.
In practice this distinction matters most when hand-assembling requests: pasting a webhook URL with a query value someone sent you, decoding a tracking parameter from a marketing email, or figuring out why an API call fails because a raw & or # slipped unencoded into a value and got read as a delimiter instead of data. Encoding the value first, then substituting the result into the URL template, avoids exactly that class of bug.
What to Know
- %20 vs +: RFC 3986 percent-encoding always uses
%20for a space. The+convention belongs to a different, older standard —application/x-www-form-urlencoded, used when an HTML form submits data — and only applies inside that specific body format, never inside a path or a properly percent-encoded query value. Swapping the two is a classic source of bugs: a server expecting form encoding reads a stray+in a percent-encoded string as a literal plus sign, not a space. - Encode one component, not the whole URL: this tool is built for a single query value or path segment. Running the entire address (including
https://) through the encoder would also escape the slashes and colons that make it a valid URL, breaking it entirely. - Same engine as your browser: it calls the browser's native
encodeURIComponent/decodeURIComponent, so results match exactly what a real browser or JavaScriptfetchcall would produce — not an approximation. - Round-tripping is lossless: encoding a string and then decoding the result always returns exactly the original bytes, which makes it easy to sanity-check a manual encoding job by decoding it back and comparing against the source text.
- Nothing leaves your browser: encoding and decoding run entirely client-side, instantly, with no upload.
Frequently Asked Questions
Why does a space become %20 and not +?
Percent-encoding (RFC 3986) uses %20 for a space; the + convention is specific to the older application/x-www-form-urlencoded format used in form bodies, not general URL encoding. This tool uses the standard %20 form — mixing the two up is a common source of bugs when hand-building query strings.
Does it encode the whole URL or just one part?
It is designed for encoding a single component (a query value, a path segment) — encoding an entire URL including "https://" would also escape the slashes and break it, so encode only the part that needs it, then paste that piece back into the rest of the address.
Why do Turkish or accented characters turn into more than one %XX block?
Because encoding works on bytes, not visible characters. UTF-8 represents most non-ASCII characters — Turkish ç, ğ, ı, ş, or emoji — using two to four bytes, and each byte gets its own %XX pair. So "ç" becomes %C3%A7 (two blocks) and an emoji can expand to eight characters or more once encoded.
What is the difference between reserved and unreserved characters?
Unreserved characters (letters, digits, - _ . ~) are always safe and never need encoding. Reserved characters (? # / : @ & = and a few others) have structural meaning in a URL — they separate the path from the query, or one parameter from the next — so they are only encoded when they appear as literal data inside a value, not when they act as delimiters.
Is my text sent anywhere?
No — encoding and decoding happen instantly in your browser; nothing is uploaded to a server.
Similar Tools
Report a Problem
URL Encode / Decode
Comments
No comments yet — be the first to write one!