URL Encoder / Decoder

Encode special characters for safe use in URLs or decode percent-encoded strings back to readable text. Uses encodeURIComponent and decodeURIComponent for standards-compliant output.

Paste any text to URL-encode it for safe use in query parameters, or paste a percent-encoded string to decode it back to plain text. The tool uses the standard encodeURIComponent and decodeURIComponent functions for fully compliant output.

When to Use the URL Encoder/Decoder

Use URL encoding when building API query strings, constructing redirect URLs, passing form data in GET requests, or debugging encoded URLs you received from an API or log file.

Tips

  • Always encode individual parameter values, not the entire URL — otherwise you will encode the ? and & separators.
  • A + in a URL query string means a space in application/x-www-form-urlencoded format, but %20 is the standard percent-encoding for a space.
  • If your decoded output still contains percent sequences, the original string may have been double-encoded.
  • Use this tool to debug webhook URLs that look broken — decode them to see the actual parameters.

Frequently Asked Questions

What does URL encoding do?

URL encoding (percent encoding) replaces unsafe characters with a % followed by two hex digits. For example, a space becomes %20 and an ampersand becomes %26. This ensures URLs are valid across all browsers and servers.

When should I encode a URL?

Encode whenever you pass user input as a URL parameter, build query strings dynamically, or include special characters like spaces, ampersands, or non-ASCII text in a URL.

What is the difference between encodeURI and encodeURIComponent?

encodeURI encodes a full URL but preserves characters like : / ? # that have meaning in URLs. encodeURIComponent encodes everything except letters, digits, and - _ . ~ — use it for individual parameter values.

Does it handle Unicode characters?

Yes. Non-ASCII characters like accented letters, CJK characters and emojis are first encoded as UTF-8 bytes, then each byte is percent-encoded.

Is double-encoding a risk?

Yes. If you encode an already-encoded string, %20 becomes %2520. Our tool works on the raw input you provide — only encode once.

Related Tools