Skip to content

URL Encoder

Encode or decode URLs safely.

encodeURIComponent
0 chars

Encoding escapes the characters that break a URL; decoding reverses it. Both run in this browser tab.

Encode or decode a URL component

  1. [01]

    Paste the text or the encoded string into the input box.

  2. [02]

    Click [ ENCODE ] to escape the text, or [ DECODE ] to turn it back into plain text.

  3. [03]

    Read the result on the right, then click [ COPY ] to put it on your clipboard.

  4. [04]

    Use [ CLEAR ] to empty both boxes and start over.

// What gets escaped

  • >Spaces — A space becomes %20, which is safe to place inside a URL component.
  • >Reserved symbols — Characters such as & = ? # / are escaped so they are treated as data, not as URL syntax.
  • >Non-ASCII text — Letters outside basic English are percent-encoded using UTF-8, matching what browsers send.

// A value before and after encoding

IN

hello world & co

OUT

hello%20world%20%26%20co

Spaces become %20 and the ampersand becomes %26, so the string is safe inside a URL.

// Questions about this tool

Is my text uploaded anywhere?

No. Encoding and decoding happen in your browser tab; the text never leaves the page.

What is the difference between encode and decode?

Encode turns readable text into a URL-safe form with % escapes. Decode reverses that, turning the escaped form back into the original text.

Why did decoding show an error?

Decoding expects a valid %-encoded string. A stray or incomplete % sequence (for example a trailing % with no digits) cannot be reversed.

Will this encode a whole URL or just a value?

It escapes text the way a single URL component is escaped. Do not paste an entire URL with its ? and & separators if you want those kept intact — encode the individual values instead.

Does it handle non-English characters?

Yes. Letters outside ASCII are percent-encoded using UTF-8, which is what browsers and servers expect.