t▴ToolDock Less busywork. More possibility. ↗
← Back to all tools
↗
URL Encoder

URL Encoder

Make special characters safe for your next URL parameter.

Something missing? Suggest an improvement →

Worked examples: try and compare

These examples show expected results and common failure cases. Loading an example replaces the tool input after confirmation when you already have text.

Encode a search value

red & blue

Expected: red%20%26%20blue

The ampersand belongs to this value rather than separating query parameters.

Decode once, not twice

100%25

Expected: 100%

The decoded percent sign is literal text. Decoding it again is not valid.

How to use URL Encoder

Uses encodeURIComponent for individual URL parameters and decodeURIComponent for decoding. A plus sign is not automatically treated as a space.

Encode one query parameter at a time

For a query value red & blue, Encode returns red%20%26%20blue. You can place that after ?q= without its ampersand starting another parameter. Encoding an entire https:// address here also encodes its separators because the tool uses component encoding, not whole-URL encoding.

Avoid double encoding

If an existing value already contains %20, encoding it again changes the percent sign to %25. Decode only when you know the current layer of encoding. A literal plus sign stays a plus sign when decoding here; some HTML form parsers instead interpret plus as a space.

Diagnose malformed percent sequences

A percent sign needs two hexadecimal digits, and the encoded bytes must describe valid text. Truncated sequences can fail to decode. Keep the original value while investigating and compare it with the sender’s expected format. This tool does not fetch the URL or check whether its destination exists.

Do you upload my data?

This tool runs in your browser. Inputs and results are not sent to our server. Closing or refreshing the page clears your work, so save any results you need.