URL Encoder / Decoder

How to use:

  • Encode: Paste a URL or text containing special characters and click Encode to convert them to percent-encoded format.
  • Decode: Paste a percent-encoded string and click Decode to restore the original text.
  • All processing happens in your browser — no data is sent to any server.

URL Encoding and Decoding Explained

URL encoding, also known as percent-encoding, is a mechanism for converting characters that are not allowed in a URL into a format that can be transmitted safely. Special characters like spaces, ampersands, question marks, and non-ASCII characters are replaced with a % sign followed by their two-digit hexadecimal value. For example, a space becomes %20 and an ampersand becomes %26.

Why URL Encoding Matters

URLs can only contain a limited set of characters from the ASCII character set. Characters outside this set — or reserved characters that have special meaning in URLs (like ?, &, =, #) — must be encoded when used as data within query parameters or path segments. Without proper encoding, URLs can break, produce unexpected results, or create security vulnerabilities.

Common Characters That Need Encoding

This tool uses JavaScript's encodeURIComponent and decodeURIComponent functions, which handle full UTF-8 encoding and correctly encode all reserved characters except - _ . ! ~ * ' ( ).

Frequently Asked Questions

What is the difference between encodeURI and encodeURIComponent?

encodeURI encodes a full URI but preserves characters that are valid in a URL structure (like :, /, ?, &). encodeURIComponent encodes everything except letters, digits, and - _ . ! ~ * ' ( ), making it the correct choice for encoding individual query parameter values. This tool uses encodeURIComponent for the most thorough encoding.

Is URL encoding the same as Base64 encoding?

No. URL encoding (percent-encoding) replaces unsafe characters with %XX hex sequences and is designed specifically for URLs. Base64 encoding converts arbitrary binary data into a 64-character alphabet and is used for embedding binary data in text-based formats. They solve different problems, though they are sometimes used together (e.g., Base64url encoding in JWT tokens).

Should I encode the entire URL or just the parameters?

You should only encode the values within query parameters, not the entire URL. Encoding the full URL would break its structure by encoding characters like ://, /, ?, and & that are needed to separate the URL's components. Paste just the value you want to encode into this tool.

Is my data sent to a server?

No. All encoding and decoding is performed entirely in your browser using built-in JavaScript functions. Your data never leaves your device. No information is transmitted, stored, or logged by this tool.