Skip to content
My Tiny Utils

Search tools

Type to find a tool, then press Enter to open it.

URL Encoder / Decoder

Percent-encode or decode URL text with a clear choice between encodeURIComponent and encodeURI, plus + as space handling for query strings.

Processed locally in your browser — nothing is uploaded.

URL Encoder / Decoder

encodeURIComponent escapes everything with special meaning in a URL, including / ? & = # and :. Use it for a single value — a query parameter, a path segment — never a whole URL.

0 characters

Encoded

Output appears here…

About URL Encoder / Decoder

Encode or decode percent-escaped URL text — and know which encoder you actually need. encodeURIComponent escapes everything with special meaning (/, ?, &, =, #) and is right for a single value like a query parameter; encodeURI leaves URL structure intact and is right for a complete URL. The tool explains the active mode so you don't mix them up.

A query-string option treats + as a space, matching how HTML forms and many APIs encode application/x-www-form-urlencoded data.

Common uses

  • Encode a parameter value that contains &, =, or non-ASCII text
  • Decode a percent-encoded URL copied from a log or email
  • Check why a redirect URL is double-encoded

Example

Input

name=Ada Lovelace & co?

Output

name%3DAda%20Lovelace%20%26%20co%3F

Frequently asked questions

Is the text I encode or decode here sent to a server?

No. Encoding and decoding use JavaScript's built-in functions running in your browser, so URLs, tokens, and parameter values never leave your device.

When should I use encodeURIComponent instead of encodeURI?

Use encodeURIComponent for a single value going into a URL — a query parameter or path segment — because it escapes structural characters like /, ?, &, =, and #. Use encodeURI only on a complete URL, where those characters must stay intact for the URL to keep working.

What does %20 in a URL actually mean?

It's percent-encoding: a % followed by the two hex digits of a UTF-8 byte, and 0x20 is the space character. Multi-byte characters take several escapes — é becomes %C3%A9.

Why do spaces sometimes appear as + instead of %20?

The + convention comes from application/x-www-form-urlencoded, the format HTML forms use for query strings and form bodies. This tool has a query-string toggle that encodes spaces as + and treats + as a space when decoding; outside query strings, %20 is the correct encoding.

Why do I get an error when decoding my string?

Decoding fails when a % isn't followed by two valid hex digits — a stray %, a truncated %2, or text that was never percent-encoded. Check for incomplete sequences, and note that a double-encoded string needs two decode passes.