About this tool
This tool percent-encodes text for safe use in URLs and decodes percent-escaped text back to readable characters, including Unicode. Developers, marketers and analysts use it when building query strings, debugging links or reading encoded tracking parameters. Percent encoding replaces a character with a percent sign followed by two hexadecimal digits for each UTF-8 byte, so a space becomes %20.
How it works
Choose Encode or Decode, then pick a scope. Component mode is for a single piece of a URL, such as one query value or a path segment, and it escapes every reserved character. Complete URI mode is for a whole address and keeps separators such as slash, colon, question mark and ampersand so the URL structure survives.
Paste your text and the result updates as you type; copy it when it looks right. The tool only transforms text and never opens or requests the URL. If decoding fails, look for a lone percent sign or an escape that is cut short, because a single malformed sequence stops the whole conversion.
Example
In component mode, hello world becomes hello%20world, and a&b becomes a%26b. A search value with an accent and punctuation, café & tea?, becomes caf%C3%A9%20%26%20tea%3F: é turns into two UTF-8 escapes, the ampersand becomes %26 and the question mark becomes %3F. A literal percent sign is escaped too, so 50% off becomes 50%25%20off.
The scope matters when you build links. Encoding https://example.com/search?q=café & tea in complete URI mode gives https://example.com/search?q=caf%C3%A9%20&%20tea, where the ampersand stays raw and splits the value into a second parameter. Encode the value alone in component mode, then append it after q=. Decoding %E2%82%AC10 returns €10.
Assumptions and limits
The tool follows standard JavaScript URI encoding and handles up to 100,000 characters. It does not convert plus signs to spaces as HTML forms do, validate whether a URL works, parse query strings into parameters, or perform Base64, HTML entity or punycode conversion. Malformed percent escapes are rejected rather than partially decoded.
Frequently asked questions
Why does a plus sign remain a plus sign?
This tool uses URI percent encoding, not HTML form encoding. It does not replace plus signs with spaces, and spaces encode as %20. If your text came from a submitted form or a query string built with application/x-www-form-urlencoded, replace each + with a space before decoding here.
Why does decoding fail?
Every percent escape must contain two hexadecimal digits and represent valid UTF-8. Incomplete escapes such as %2, a stray percent sign as in 100%, or byte sequences that are not valid UTF-8 are rejected rather than partially decoded. Fix or encode the offending part, then try again.
What is the difference between component and complete URI encoding?
Component mode also encodes reserved characters such as /, ?, &, = and #, so a value cannot break the URL structure. Complete URI mode leaves those separators intact and encodes only characters that are not allowed in a URL, such as spaces and non-ASCII letters. Use component mode for values you insert and complete URI mode only for an address that is already correctly structured.
Why are non-English characters encoded as several escapes?
Each character is first converted to UTF-8 bytes, and every byte becomes one escape. For example, é uses two bytes and encodes as %C3%A9, while the euro sign uses three and becomes %E2%82%AC. Letters, digits and a few marks such as - _ . ~ need no escaping and stay as they are.
Should I encode the whole URL or only the parameter values?
Encode each value separately with component mode and then join the pieces with the separators you want. Encoding a finished URL as a component would also escape its :// and slashes, producing an address browsers cannot open. Complete URI mode is safe only for tidying a URL whose structure is already correct, for instance one with spaces or accented letters in the path.
Link with your values
Add these parameters to this page’s address to open it with the values filled in, for example to share a calculation or to link to it from an AI assistant. The result is calculated in the browser: the page HTML shows an example for the default values, and the tool sets the data-url-params attribute once the link’s values are applied.
| Parameter | Value | If omitted |
|---|---|---|
modeOperation | one of: encode, decode | default encode |
scopeEncoding scope | one of: component, uri | default component |
textInput text | not accepted in links: enter it on the page |
Examples
?mode=decode?mode=encode&scope=uri
Write decimals with a point. Encode a space as %20, + as %2B, # as %23 and & as %26.
Result elements: [data-result-block="url-codec"]