URL Encoder

URL Encoder converts text into a percent-encoded form that is safe to place inside a URL. Characters that have special meaning — spaces, ampersands, question marks, slashes and non-ASCII letters — are replaced with %XX escape sequences so the link is transmitted exactly as intended.

Choose between encoding a single component (like one query value), a full URL, or HTML-form style encoding where spaces become a plus sign. Everything runs locally in your browser, so the text you paste never leaves your device.

encodeURIComponent — escapes every reserved character (&, ?, =, /, #, space…). Use this for a single query value or path segment.

Plain text
Encoded
Encoded text appears here.

How to use URL Encoder

  1. 1

    Pick an encoding mode

    Component for a single value, Full URL to encode a complete address, or Form for application/x-www-form-urlencoded data.

  2. 2

    Paste your text

    Type or paste into the input box — the encoded result updates instantly on the right.

  3. 3

    Copy the result

    Click Copy and drop the encoded string straight into your URL or request.

What is URL encoding?

URLs may only contain a limited set of ASCII characters. Anything outside that set — or any character that is reserved for structure, such as ? & = # / — must be percent-encoded so it is treated as data rather than syntax. Percent-encoding replaces a byte with a % followed by its two-digit hexadecimal value; a space, for example, becomes %20.

Encoding matters most for query string values. If a search term contains an ampersand and you don't encode it, the server will read everything after the & as a new parameter, breaking the request.

Component vs full-URL encoding

Component encoding (encodeURIComponent) escapes every reserved character, including / ? : @ & = + $ #. Use it when the text is a single piece of data going into one part of the URL, like a query value or a single path segment.

Full-URL encoding (encodeURI) leaves the characters that build URL structure alone, so :// and the separators between parameters survive. Use it when you have an entire URL that only needs its unsafe characters (like spaces) escaped.

Form encoding behaves like component encoding but renders spaces as + rather than %20, which is what browsers send for application/x-www-form-urlencoded form submissions.

Frequently asked questions

When should I use Component instead of Full URL?
Use Component when you are encoding a single value such as a search term or one path segment. Use Full URL when you have a whole address and only want unsafe characters escaped while keeping :// and parameter separators intact.
Why does a space sometimes become %20 and sometimes +?
In a path or generic URL a space is %20. In application/x-www-form-urlencoded form data a space is encoded as +. The Form mode here produces the + variant.
Is my text uploaded anywhere?
No. Encoding runs entirely in your browser, so nothing you paste is sent to a server.

Last updated: