Browser-only utility

Percent-encode a URL component.

Encode query values, path segments, and special characters for safer use inside a URL without uploading your text.

Private browser workspace — input is processed on your device. Maximum input: 1,000,000 characters.

Initializing tool…

How it works

Use URL Encoder locally

The encoder uses encodeURIComponent for a single URL component, escaping spaces, ampersands, slashes, and non-ASCII bytes where necessary.

Important limitations

This is a component encoder, not a full URL normalizer. Encoding an entire URL will also encode its separators.

Processing runs on your device. Keep source content when exact formatting or compatibility matters.

Practical walkthrough

Encode a search query value safely

An application builds a URL with a user-entered search term. The query value contains spaces, an ampersand and an equals sign.

One URL component

search=tea & cake

Expected behavior

The component becomes search%3Dtea%20%26%20cake. Insert the encoded value into the appropriate part of a URL; do not encode the entire URL and expect its separators to remain intact.

Check before using the output

Form-style query strings can use + for spaces; encodeURIComponent uses %20. The decoder does not automatically interpret + as a space.

Next step: Decode percent-encoded text.