Encoding
URL Encoder / Decoder
Encode or decode a URL component.
Ready. Use the example or paste your own input.
How to use URL Encoder / Decoder
Encode a query parameter value or decode a percent-encoded component.
Good to know
This uses encodeURIComponent, so reserved characters such as /, ?, and & are encoded. It is not intended to encode a complete URL. A plus sign stays a plus sign when decoding.
Encode a query parameter value
Choose Encode to try this example.
Input
coffee & tea
Expected result
coffee%20%26%20tea
Common questions and mistakes
Should I encode the whole URL?
Use this tool for one component, such as the value after q= in a search URL. Encoding a complete URL also encodes its : and / characters. When building URLs in code, URL and URLSearchParams can manage components for you.
Why does + remain + after decoding?
This tool decodes percent escapes with decodeURIComponent. It does not apply HTML form decoding, where + can stand for a space. A literal plus sign encodes as %2B. Invalid percent sequences produce an error.
Related tools
- Base64 Encoder / Decoder — Convert Unicode text to and from Base64.
- JSON Formatter — Format, validate, and minify JSON.