What the URL Encoder / Decoder does
The URL Encoder / Decoder turns text into a browser-safe percent-encoded string and turns those strings back into readable text. It is the quickest way to repair a link that contains spaces, ampersands, question marks or non-Latin characters. Paste an address such as https://example.com?name=张三&city=北京 and the tool shows exactly how each byte must be written inside a query string, so you can copy a value into an API call, a redirect or an HTML form with confidence.
Two encoding modes cover different jobs. Component mode escapes every reserved character, which is what you want for a single parameter value. Full-address mode leaves the structural characters colon, slash, question mark, ampersand and equals sign intact, so a complete address stays clickable while only the unsafe parts are converted. Decoding reverses either operation and reports a clear error when the input is not valid percent-encoding instead of returning silent garbage.
How to use it
- Paste your textType or paste the text, parameter value or full address into the input box. The field starts with a sample query string so you immediately see how non-Latin names and ampersands behave.
- Choose an encode modeClick URL Encode to escape a single value, or All Characters to encode an entire address while preserving its structural separators. Pick according to whether you are encoding one parameter or a whole link.
- Copy the resultThe encoded or decoded string appears in the result panel with a character count underneath. Select it and copy; the counter confirms the new length so you can check it against a field limit.
- Decode to verifyPaste a percent-encoded string and press Decode to read it in plain text. If the string is malformed the panel shows a decode-failed message rather than an empty or misleading answer.
Options and formats
Things to watch out for
Frequently asked questions
When should I use component encoding instead of full-address encoding?
Use component encoding when the text is a single value that will be placed after a parameter name. Use the structure-preserving mode when you handle a complete address and still need its separators readable. Mixing the two is what usually breaks redirect links and API query strings.
Why did my decoded result keep the plus signs?
Percent-encoding represents a space as %20, while HTML forms send it as a plus sign. This decoder only reverses percent escapes, so plus signs stay as they are. If a value came from a form submission, replace the plus signs with spaces by hand after decoding.
Can I encode a value that contains Chinese or other non-Latin characters?
Yes. Non-Latin text is converted to its UTF-8 byte sequence, with each byte written as a percent escape. That is why a three-character Chinese name can expand into nine escape groups. The character count under the result shows how much the string grows.
What causes the decode failure message?
The decoder stops when it meets a percent sign that is not followed by two valid hexadecimal digits, or when the remaining bytes do not form valid UTF-8. Truncated links, mixed encodings and copy errors in the middle of an escape sequence are the common causes.
Should I encode an entire API request body?
No. This tool is for addresses and their query parameters. JSON bodies, form fields and headers each have their own escaping rules, and applying percent-encoding to a JSON document corrupts it. Encode only the values you place inside an address.
Is the encoded output stable between runs?
Yes. Encoding is deterministic, so the same input always produces the same output, and only the set of reserved characters differs between the two modes. That predictability lets you store an encoded value and compare it with a later result.