URL Encode

Percent-encode any string so it survives URLs - spaces become %20, ampersands %26 - with both component and full-URL modes.

Updated September 2026 · Written and verified by Akash Pandey

URL Encode

Output

How to use the URL encoder

  1. Enter the text you need to put safely into a URL.
  2. Choose Component mode (default, for query values and paths) or Full URL mode (keeps : / ? = & structure).
  3. Copy the encoded result or build a ready-to-test href with the sample link.

Frequently asked questions

What is percent-encoding?

Representing unsafe characters as %XX, where XX is their UTF-8 byte in hex. It is how "hello world" can live inside a URL as "hello%20world".

Component vs full URL - which should I use?

Component mode encodes everything including "&" and "=", correct for a single query value. Full URL mode leaves structural characters alone so an entire URL keeps meaning when encoded.

Are spaces converted to + or %20?

Component mode uses the standards-compliant %20 (same as encodeURIComponent). The + form is a legacy application/x-www-form-urlencoded quirk this tool does not use.

How is Unicode handled?

Text is encoded as UTF-8 bytes first, so "café" correctly becomes "caf%C3%A9".

When would I need this in practice?

Any time you build URLs by hand from user input - search links, API calls, sharing links with special characters.

What is the difference between encodeURI and encodeURIComponent?

encodeURI preserves URL structure characters like https://, :, and ?, while encodeURIComponent encodes everything including /, ?, and &, which is required for query parameter values.

How does URL encoding represent spaces?

Standard percent-encoding represents spaces as %20. Some legacy web forms use +, but %20 is the canonical standard for modern URLs.

Are non-ASCII international characters supported in URL encoding?

Yes. Characters are converted to UTF-8 bytes and each byte is encoded as %XX.