← All tools

URL Encoder / Decoder

Percent-encode strings for safe use in URLs and query parameters, or decode percent-encoded strings back to readable text.

All processing is client-side — your data never leaves your browser.
Plain Text / URL Input
Percent-Encoded Output
Output will appear here...

Common Encoded Characters

About URL Encoding

What is URL Encoding?

URL encoding (percent-encoding) converts characters that are not allowed or have special meaning in URLs into a %XX hex format. Every character becomes its UTF-8 byte value written as % followed by two hex digits.

Characters That Get Encoded

Spaces become %20, ampersands become %26, equals signs become %3D, and all non-ASCII characters are encoded. Letters, digits, and the characters - _ . ~ are left untouched by encodeURIComponent.

encodeURI vs encodeURIComponent

encodeURI encodes a full URL and leaves structural characters like /, ?, and # intact. encodeURIComponent encodes everything, including those characters, making it correct for individual query parameter values. This tool uses encodeURIComponent.

When You Need This

Use URL encoding when building query strings manually, embedding URLs inside other URLs, constructing API request parameters that contain user input, or debugging a server that returns percent-encoded data you need to read.

How to use

  1. 1
    Enter your URL or text

    Paste the URL or string you want to encode or decode into the input area.

  2. 2
    Choose Encode or Decode

    Click "Encode" to percent-encode special characters, or "Decode" to restore percent-encoded text back to readable form.

  3. 3
    Copy the result

    Use the Copy button to grab the output.

Frequently asked questions

What is URL encoding (percent-encoding)?

URL encoding replaces characters that have special meaning in URLs (spaces, &, =, #, ?) with a percent sign followed by their two-digit hexadecimal ASCII code. For example, a space becomes %20 and & becomes %26. This ensures the URL remains valid when special characters appear in parameter values.

When do I need to encode a URL?

You need to encode individual query parameter values when they contain characters that would be misinterpreted as URL syntax. Do not encode the entire URL — only the values of query string parameters. For example, in /search?q=hello+world, "hello world" should be encoded as hello%20world.

What is the difference between encodeURI and encodeURIComponent?

encodeURI encodes a full URL and leaves structural characters like /, :, @, ? and # intact. encodeURIComponent encodes everything including those characters and is intended for encoding individual query parameter values. This tool uses encodeURIComponent for maximum compatibility.

Why does a space become %20 and not +?

Both %20 and + represent a space, but in different contexts. %20 is the standard percent-encoding used in URL paths and modern APIs. The + convention comes from HTML form submissions (application/x-www-form-urlencoded) and is specific to that format. %20 is the safer, more universal choice.