Overview
Introduction
This tool reverses percent-encoded URL text back into the integer Unicode code point of the single character it represents.
It's the counterpart to the Integer URL Encoder, letting you recover the original code point from an encoded string.
What Is Integer URL Decoder?
A converter that takes a list of percent-encoded strings, one per line, and outputs the integer code point of the single character each one decodes to.
It strictly requires each line to decode to exactly one character; anything else is treated as invalid for this tool's purpose.
How Integer URL Decoder Works
Each line is passed through `decodeURIComponent` to reverse the percent-encoding.
The tool checks that the decoded result is exactly one Unicode code point (using code-point-aware iteration, not raw UTF-16 units).
That single character's code point is read with `codePointAt(0)` and reported as the result.
When To Use Integer URL Decoder
Use it to recover the code point behind a percent-encoded character you've found in a URL or query string.
It's also useful for verifying round-trip correctness with the Integer URL Encoder.
Often used alongside Integer URL Encoder and HTML Entity to Integer Converter.
Features
Advantages
- Correctly counts code points rather than raw UTF-16 units, so it handles characters outside the Basic Multilingual Plane properly.
- Clearly rejects malformed or multi-character input instead of guessing.
Limitations
- Only accepts input representing a single character; multi-character percent-encoded strings need a different, general-purpose URL decoder.
- Malformed percent-encoding (like a stray "%" not followed by two hex digits) is rejected outright.
Examples
Best Practices & Notes
Best Practices
- If you need to decode a full percent-encoded string with multiple characters, use a general-purpose URL decoder instead of this single-code-point tool.
Developer Notes
Uses `Array.from(decoded)` rather than `decoded.length` to count characters, since `Array.from` iterates by Unicode code point instead of raw UTF-16 code unit, correctly counting surrogate-pair characters as one.
Integer URL Decoder Use Cases
- Recovering the code point behind a percent-encoded character from a URL
- Verifying round-trip correctness against the Integer URL Encoder
- Teaching how percent-encoding maps back to Unicode code points
Common Mistakes
- Feeding in a multi-character percent-encoded string, which is rejected since this tool expects exactly one resulting character.
- Expecting malformed escapes (like a lone "%") to decode gracefully instead of erroring.
Tips
- Use the companion Integer URL Encoder to generate valid single-character test input.