🔒 All tools run entirely in your browser. No data leaves your device.

URL Encoder

Percent-encode strings for safe use in URLs (component or full URL) and decode %-escaped text. Runs in your browser.

About this tool

URL encoding (also called percent-encoding) replaces characters that cannot appear in URLs with %XX sequences of their UTF-8 byte values. Spaces, non-ASCII characters, and URL-structural characters like ?, &, and = are the common targets.

The tool uses the browser’s built-in encodeURIComponent and encodeURI (and their decoding counterparts). They differ in which characters they preserve. Component mode is strict — it escapes URL-structural characters — and is the right choice for query-string values. Full URL mode preserves URL structure, so it will not double-encode an already-valid URL.

Frequently asked questions

What is the difference between component and full URL mode?

Component mode (encodeURIComponent) percent-encodes every reserved character including /, ?, &, = — suitable for values you plug into a query string or path segment. Full URL mode (encodeURI) leaves URL-structural characters alone — suitable for encoding a whole URL that may contain spaces or non-ASCII.

Why did "hello world" become "hello%20world" in one mode and stay unchanged in another?

A literal space is not a valid URL character, so both modes encode it. In full URL mode it becomes %20 because encodeURI escapes only structural-conflict characters. The output is the same for plain text — the modes differ mostly around /, :, ?, #, &, and =.

Can I encode multiple query parameters at once?

Yes — paste the values one per line and switch to component mode. For building whole query strings, you usually want each value encoded in component mode then joined with &.

Does decode handle invalid input?

If the input contains a malformed escape (e.g. "%GZ"), decoding throws and the tool shows the error. Fix the bad escape or switch modes to retry.

Is my input sent to your servers?

No. encodeURI / encodeURIComponent are browser built-ins; this tool never makes a network request with your input.