URL Decoder and Encoder

Encode text for URLs or decode percent-encoded query strings.

EncodeDecodeQuery strings
Useful for query parameters and API testing.

URL, URI, JavaScript, and HTML encoding

The converter applies the browser's component-level percent encoding and decoding behavior, corresponding to JavaScript encodeURIComponent and decodeURIComponent. Use it for a query value, path segment, redirect parameter, or another component rather than blindly encoding an entire URL with separators.

Java and other languages provide their own APIs and character-set defaults. For entity text such as & or <, use the HTML Escape and Unescape Tool.

How to Use URL Encoder and Decoder

URL Encoder and Decoder handles real query strings, path segments, redirect values, and copied links that need percent encoding checks.

  1. Paste the exact URL part you need to encode or decode, not extra surrounding text.
  2. Decide whether you are encoding a query value, path segment, or full URL before copying the result.
  3. Convert the text, then compare separators such as ?, &, =, and / with the original link.
  4. Encoding a full URL as one value can break separators that should remain readable.
  5. Keep the converted value with the parameter or field name so it is not pasted into the wrong place.

Things to Check

  • Encoding a full url can break separators.
  • Long URL batches or copied logs can slow small devices; encode one link group at a time.
  • Test the encoded link in the browser, API request, redirect rule, or form field that will use it.

Helpful FAQ

When is this tool most useful?

Use it when preparing query parameters, redirect URLs, API values, tracking links, or copied percent-encoded text.

What should I inspect before using the output?

Check reserved characters, spaces, Unicode, repeated encoding, separators, and whether the final link still opens correctly.

Does this replace a specialist editor?

For routing rules, security-sensitive redirects, or application encoding bugs, review the code path directly.

Maintained by Taimour Husnain.

Decode a URL component, not decrypt it

Open the URL encoder and decoder for percent-encoded text such as hello%20world. Decoding reverses percent encoding with the browser's decodeURIComponent behavior. It is not decryption, password recovery, token decoding, redirect following, or a security bypass.

Malformed percent sequences produce an error instead of a guessed result. A plus sign is not automatically converted to a space because this page works on URL components, not an entire form-urlencoded request body.

String encode and decode online

String encoding converts text into a format safe for transmission or storage. Common encoding types include: URL encoding (percent-encoding for web URLs), Base64 (binary-to-text for email and APIs), HTML entities (special characters in web pages), and Unicode escapes (cross-platform text representation).

Use the URL encoder/decoder above for percent-encoding. For Base64, use the Base64 Encoder/Decoder. For HTML entities, use the HTML Entity Encoder/Decoder. In JavaScript, use encodeURIComponent() for URL components and btoa() for Base64. The encoder above wraps both operations for quick browser-based conversion.

URL encoding for spaces and special characters

Spaces in URLs must be encoded as %20 (or + in query strings). Colons encode as %3A, slashes as %2F, question marks as %3F, and ampersands as %26. These percent-encoded characters ensure URLs are valid and parseable by web servers and browsers.

Use the encoder/decoder above to convert between readable and encoded forms. When building URLs programmatically, encode each component separately before joining with ? and &. Never encode the structural characters (?, &, =) that separate query parameters — only encode the values within them.