URL Encoder / Decoder

Free online URL encoder and decoder. Encode special characters for use in URLs or decode percent-encoded strings instantly. Supports full URLs, individual components, and query strings.

Advertisement
Advertisement

How to Use the URL Encoder / Decoder

Type or paste text into the left (decoded) panel to encode it, or paste percent-encoded text into the right (encoded) panel to decode it. Both panels stay in sync — changes to either side instantly update the other. Choose the encoding context at the top: Component mode (default) encodes all reserved characters and is right for query parameter values; Full URL mode preserves URL structure while encoding unsafe characters; Query String mode lets you build and parse key-value parameter tables.

About This Tool

Encode and decode URLs using the same native browser functions that JavaScript and web browsers use internally. Three encoding contexts cover every use case: Component mode uses encodeURIComponent() to encode all reserved characters, making values safe for query parameters and path segments. Full URL mode uses encodeURI() to encode a complete URL while preserving its structure. Query String mode parses and builds key-value parameter strings using URLSearchParams. The difference matters — using the wrong encoding function is a common source of bugs in web development. Related: JSON Formatter for formatting API payloads, Base64 Image Encoder for encoding binary data as text.

Quick Reference Table

CharacterEncodedDescription
(space)%20Space character
&%26Ampersand
=%3DEquals sign
?%3FQuestion mark
/%2FForward slash
:%3AColon
@%40At sign
+%2BPlus sign
#%23Hash / fragment
%%25Percent (literal)

Frequently Asked Questions

What is the difference between %20 and + for spaces?

Both represent a space in URL context, but in different places. %20 is the standard percent-encoded space valid anywhere in a URL. The + sign represents a space only in application/x-www-form-urlencoded data — the format used by HTML form submissions. In a URL path, + is a literal plus sign, not a space. When in doubt, use %20.

Why does my URL have %25 in it?

A literal % character must itself be encoded as %25. If you see %25 in a URL, it means the original text contained a % character. Double-encoding (%2520) means a % that was already encoded (%25) got encoded again — a common mistake when encoding an already-encoded string.

When should I use encodeURI vs encodeURIComponent?

Use encodeURI() when encoding a complete URL that you want to remain navigable — it preserves /, ?, &, =, and other structural characters. Use encodeURIComponent() when encoding a value that will be placed inside a URL, such as a query parameter value or a path segment.

What characters are never encoded?

encodeURIComponent never encodes: letters (A–Z, a–z), digits (0–9), and these symbols: - _ . ! ~ * ’ ( ). These are considered unreserved characters and are always safe in any part of a URL.

Does this work with non-English characters?

Yes. All Unicode characters — including accented letters, Chinese, Arabic, emoji, and any other script — are correctly encoded using their UTF-8 byte sequences. For example, the Icelandic letter ð encodes to %C3%B0.

Related Tools