Developer tools
URL encoder and decoder
Component mode applies encodeURIComponent/decodeURIComponent to one parameter or fragment. Whole-URI mode preserves URI separators and keeps encoded reserved separators during decoding. Neither mode validates a destination or fetches a URL. A plus sign stays a plus sign: this is not form-urlencoded decoding. Malformed percent sequences and invalid UTF-8 are rejected.
Paste text, choose options and calculate. Up to 20,000 UTF-16 code units (an emoji can use more than one). Empty input is allowed except for naming conversion.
Result
Method:
Processing stays in this browser tab. Input is not sent, saved in browser storage or added to the URL. The original TXT download contains the result. The additional JSON export contains the input, selected options and exact result. Copy may require permission; selecting text is available as a fallback. Changing an input clears the previous result. Optional own UTF-8 file up to 32 KiB and 20000 UTF-16 units; raw file and form line endings are recorded separately. CSV protects formula-like lines with an apostrophe; printable HTML refuses unsupported control characters. Optional live calculation is off by default.
How it works
Component mode applies encodeURIComponent/decodeURIComponent to one parameter or fragment. Whole-URI mode preserves URI separators and keeps encoded reserved separators during decoding. Neither mode validates a destination or fetches a URL. A plus sign stays a plus sign: this is not form-urlencoded decoding. Malformed percent sequences and invalid UTF-8 are rejected. Shared own file and JSON/numbered-line CSV/printable HTML exports record the unchanged calculation result and actual selected options. Processing stays in this browser tab. Input is not sent, saved in browser storage or added to the URL. The original TXT download contains the result. The additional JSON export contains the input, selected options and exact result. Copy may require permission; selecting text is available as a fallback. Changing an input clears the previous result. Optional own UTF-8 file up to 32 KiB and 20000 UTF-16 units; raw file and form line endings are recorded separately. CSV protects formula-like lines with an apostrophe; printable HTML refuses unsupported control characters. Optional live calculation is off by default.
Worked example
Example input: Hello & world
Worked example
With these example values the calculator gives the result below. You can change any value in the form above.
Inputs
- Input text
- Own query: tea & cake
- Operation
- Encode
- Variant
- One URL component
Result
- Result
- Unicode code points: 33
Frequently asked questions
How do I URL encode a text?
Choose encode in the URL encoder and decoder. Component mode applies encodeURIComponent, so Own query: tea & cake becomes Own%20query%3A%20tea%20%26%20cake.
What is the difference between component mode and whole-URI mode?
Component mode encodes one parameter or fragment. Whole-URI mode preserves URI separators and keeps encoded reserved separators when decoding.
Why is the plus sign not decoded as a space?
The URL decoder keeps a plus sign as a plus sign because it does not perform form-urlencoded decoding.
Why does URL decoding fail for my text?
Malformed percent sequences and invalid UTF-8 are rejected by the URL encoder and decoder instead of being partly decoded.
How much text can the URL encoder handle?
Up to 20,000 UTF-16 code units, where an emoji can use more than one. An optional UTF-8 file can be up to 32 KiB.
Does the URL encoder check whether a link works?
No. Neither mode validates a destination or fetches a URL; the tool only converts the text.