Skip to content
Free tool

URL Encoder & Decoder – encode and decode URLs online

Encode and decode URLs right in your browser: the URL Encoder converts text and URLs to percent encoding, turning a space into %20 and “ä” into %C3%A4. As a URL Decoder, it turns % sequences back into readable text. Compare encodeURIComponent, encodeURI and form encoding with +, view a URL’s decoded query parameters, and build query strings and UTM links. Free, no sign-up required; your text stays in your browser.

Built by Dimitri Heissler

Building something of your own? Host it on a VPS with full control.

Encodes everything except letters, digits, and the characters -_.~!*'(). Ideal for individual parameter values, path segments, and anything embedded in a URL.

Your text stays in your browser: it is neither uploaded nor saved.

Characters in the input
0
Characters in the result
0
Characters encoded
0
Input bytes
0

Build a query string and UTM link

Enter a name and value for each parameter, or use “UTM Parameters” to add the three fields for a campaign link. Each value is encoded separately, so an & or = in a value cannot break the URL.

0 parameters in the URL

Example result

What this URL Encoder and Decoder shows you

Paste text or a URL and you’ll immediately get the encoded or decoded result. When encoding, you’ll also see a list of replaced characters and their bytes; when decoding a URL, you’ll see each query parameter in readable form. Three examples:

Example 1: Encode a value

Input (component variant, encodeURIComponent):

Müller & Söhne: 50% off?

Output:

M%C3%BCller%20%26%20S%C3%B6hne%3A%2050%25%20off%3F
Replaced characters in the first example
CharactersBytesResult
üC3 BC%C3%BC
Spaces20%20
&26%26
öC3 B6%C3%B6
:3A%3A
%25%25
?3F%3F

In words: 24 characters become 50 characters. 10 characters were replaced. The ü consists of two bytes and becomes %C3%BC, & becomes %26, and % itself becomes %25. Letters and digits remain unchanged.

Example 2: Decode and break down a URL

Input (form variant, + is read as a space):

https://example.com/search?q=green%20tomatoes&sort=price_asc&category=Fruit%20%2B%20vegetables

Output:

https://example.com/search?q=green tomatoes&sort=price_asc&category=Fruit + vegetables
Query parameters in the second example
NameValue (decoded)Raw
qgreen tomatoesgreen%20tomatoes
sortprice_ascprice_asc
categoryFruit + vegetablesFruit%20%2B%20vegetables

In words: The URL has 3 query parameters. The value of “q” is “green tomatoes”, “sort” is “price_asc”, and “category” is “Fruit + vegetables”. The plus sign in “Fruit + vegetables” is encoded as %2B and therefore remains a plus sign.

Example 3: The same URL, four variants

Input:

https://example.com/street/About us?q=Cheese#contact
Results of the four variants for the same URL
VariantResult
Component (encodeURIComponent)https%3A%2F%2Fexample.com%2Fstreet%2FAbout%20us%3Fq%3DCheese%23contact
Full URL (encodeURI)https://example.com/street/About%20us?q=Cheese#contact
Strict (RFC 3986)https%3A%2F%2Fexample.com%2Fstreet%2FAbout%20us%3Fq%3DCheese%23contact
Form (+ for spaces)https%3A%2F%2Fexample.com%2Fstreet%2FAbout+us%3Fq%3DCheese%23contact

In words: Only “Entire URL (encodeURI)” leaves https://, /, ?, and # unchanged, so the address remains accessible. The other three variants also encode these separators, turning the address into one long value. That is correct when you want to embed the entire URL as a value in another URL.

How it works

How to encode and decode a URL

Four steps from text to ready-to-use URL—no account, no download.

Step 1

Paste text or URL

Paste the text you want to encode or the encoded URL you want to read. Use “Example” to load sample text. The result appears as you type, without pressing a button.

Step 2

Choose direction, option and character set

Select “Encode” or “Decode.” Use encodeURIComponent for a single value, encodeURI for a full URL, and form encoding with + for data from an HTML form. When encoding, you can also choose strict RFC 3986 mode or “Encode each line separately.” Select UTF-8 or ISO-8859-1 as the character set.

Step 3

Check and copy the result

The tool shows how many characters were replaced, lists their Unicode code points and bytes when encoding, and warns you about double encoding, invalid % sequences or using the wrong option for a full URL. Use “Copy” to copy the result.

Step 4

Read or build parameters

When decoding a URL, the tool shows its components and decoded query parameters in a table. In “Build query string and UTM link,” enter a name and value or add the fields for a campaign link with “UTM parameters,” then copy the fully encoded URL.

Variants

encodeURIComponent, encodeURI, or form encoding: when should you use each?

All four variants follow the same encoding principle but replace different numbers of characters. Choose based on what you're encoding, not guesswork.

Component (encodeURIComponent)
For a single value: a parameter value, path segment, filename, or URL used as a parameter in another URL. Encodes everything except letters, digits, and -_.~!*'(). When in doubt, choose this option.
Approximately equivalent to: encodeURIComponent / decodeURIComponent
Full URL (encodeURI)
For a full URL that still contains spaces or accented characters. Leaves ; , / ? : @ & = + $ # untouched so the address works. It doesn't encode & or = within a value, so it isn't suitable for that.
Approximately equivalent to: encodeURI / decodeURI
Strict (RFC 3986)
Like component, but also encodes ! ' ( ) *. Necessary when another system treats these characters as separators, for example when signing OAuth requests.
Approximately equivalent to: PHP rawurlencode, Python urllib.parse.quote(wert, safe='')
Form (+ for spaces)
The format used by HTML forms (application/x-www-form-urlencoded). Spaces become +; only letters, digits, and *-._ remain unchanged, and ~ becomes %7E. Applies to query strings from forms and POST bodies of this type. PHP urlencode and Python quote_plus differ slightly for * and ~.
Approximately equivalent to: Java URLEncoder, JavaScript URLSearchParams

Character table

Special characters in URLs and their encoding

This is how the most common special characters are encoded in each format. A dash means the character remains unchanged.

Special character encoding: component, whole URL, and form
CharactersComponentFull URLForm
SpacesSpaces, often written as + in query strings%20%20+
!Sub-delimiter, with no fixed meaning––%21
"not allowed in URLs%22%22%22
#Start of fragment (anchor)%23–%23
$Sub-delimiter, with no fixed meaning%24–%24
%starts a %XX encoding sequence%25%25%25
&separates query parameters%26–%26
'Sub-delimiter, with no fixed meaning––%27
(Sub-delimiter, with no fixed meaning––%28
)Sub-delimiter, with no fixed meaning––%29
*Sub-delimiter, preserved by encodeURIComponent–––
+Plus sign; a space in form encoding%2B–%2B
,separates list values%2C–%2C
/separates path segments%2F–%2F
:separates scheme, host, and port%3A–%3A
;Sub-delimiter, with no fixed meaning%3B–%3B
=separates parameter name from value%3D–%3D
?Start of query%3F–%3F
@separates user information from host%40–%40
[only for IPv6 addresses in the host%5B%5B%5B
]only for IPv6 addresses in the host%5D%5D%5D
~unprotected; only the form format encodes it (%7E)––%7E
ä%C3%A4%C3%A4%C3%A4
€%E2%82%AC%E2%82%AC%E2%82%AC
😀%F0%9F%98%80%F0%9F%98%80%F0%9F%98%80

UTM parameters

Create a UTM link: format UTM parameters correctly

UTM parameters are added to a link so Google Analytics can see where visitors come from. The tool’s query string builder adds the three standard fields utm_source, utm_medium and utm_campaign when you select “UTM parameters” and encodes each value separately so spaces and special characters don’t break the link.

The five UTM parameters and what they mean
ParametersMeaningValue
utm_sourceWhere the visitor came from, such as newsletter, google, or instagram.typical
utm_mediumWhich channel, for example e-mail, cpc, or social.typical
utm_campaignThe campaign name, for example summer-promotion.typical
utm_termThe search term used in paid search.optional
utm_contentWhich option was clicked, such as a banner or text link.optional

Example: a newsletter link

Base URL and three parameters:

https://example.com/aktion
utm_source = newsletter
utm_medium = e-mail
utm_campaign = Summer promotion

Result:

https://example.com/aktion?utm_source=newsletter&utm_medium=e-mail&utm_campaign=Summer%20promotion

Write values in lowercase without spaces, for example summer-promotion. Analytics distinguishes between “Newsletter” and “newsletter” and tracks them separately.

Discover more

More tools

FAQ

URL Encoder & Decoder: frequently asked questions

Quick answers about URL encoding, percent signs, and this tool.

Only a few characters are allowed in a URL. All others are written as % followed by two hexadecimal digits for each byte of the character in UTF-8. A space becomes %20, “ä” becomes %C3%A4 (two bytes), “€” becomes %E2%82%AC (three bytes) and an emoji like 😀 becomes %F0%9F%98%80 (four bytes). This is also called percent encoding or URL encoding, often shortened by developers to URL encode; reversing it is URL decode.

%20 is an encoded space: 20 is the hexadecimal value of a space. Likewise, %3D stands for =, %26 for &, %2F for / and %2C for a comma. %20 works anywhere in a URL. Using + for a space is only valid in form encoding (application/x-www-form-urlencoded), such as query strings generated by an HTML form. In a path, + is an actual plus sign. “Käse & Brot” becomes “K%C3%A4se+%26+Brot” as a form value and “K%C3%A4se%20%26%20Brot” with encodeURIComponent. When decoding, choose the appropriate option: “Form” for data from forms and searches.

encodeURI leaves URL separators unchanged: ; , / ? : @ & = + $ #. encodeURIComponent encodes them too. With encodeURI, “a/b?c=d” stays “a/b?c=d”; with encodeURIComponent, it becomes “a%2Fb%3Fc%3Dd”. Use encodeURI for a complete address. Use encodeURIComponent for an individual value inserted into a URL; otherwise, an & or = in the value could break the parameters.

Select “Decode” and paste the encoded URL or text above. “M%C3%BCller%20%26%20S%C3%B6hne” becomes “Müller & Söhne”. For a URL, the tool also breaks the address into components such as scheme, host, path, query and fragment. It displays query parameters in a table with their name, decoded value and raw value—for example, q = green Tomaten instead of gr%C3%BCne%20Tomaten. Parameters follow the ?, names and values are joined by =, and multiple parameters are separated by &. For data from a form or search, select “Form” so + is read as a space in the result.

The letters A to Z and a to z, the digits 0 to 9 and the characters -_.~ remain unchanged; only form encoding encodes the tilde as %7E. The delimiters : / ? # [ ] @ ! $ & ' ( ) * + , ; = are allowed only in their respective roles, such as & between two parameters. Characters that must be encoded include spaces, quotation marks, %, < > ^ { | } and all non-ASCII characters, such as umlauts and emojis. encodeURIComponent also leaves ! * ' ( ) unchanged, while strict RFC 3986 encoding encodes those too. The character table above shows the results for the most common special characters.

You don’t include them directly: they’re encoded. Letters such as “ä”, “ß”, “é”, “ñ” and “å” each occupy two bytes in UTF-8: “ä” becomes %C3%A4, “ß” becomes %C3%9F, “é” becomes %C3%A9, “ñ” becomes %C3%B1 and “å” becomes %C3%A5. A space becomes %20, or + in form encoding. Browsers often display the address in readable form and encode it only when sending it. For links you write yourself, encode the value with encodeURIComponent or this tool. The “What happens to your characters” table shows the Unicode code points and bytes of replaced characters. Umlauts in domain names aren’t percent-encoded; they’re converted using Punycode (müller.de becomes xn--mller-kva.de), which this tool doesn’t handle.

If text that's already encoded is encoded again, % becomes %25: “%20” becomes “%2520”. You can spot this when %25 is followed by two digits and %XX sequences remain after decoding. The tool points this out and offers “Decode again”. To avoid it, encode each value exactly once, when assembling the URL.

UTF-8 is the standard today; in UTF-8, “ä” is %C3%A4. Older sites and systems may use ISO-8859-1 (Latin-1), where “ä” is %E4 and “é” is %E9. A single %E4 is invalid in UTF-8: the tool identifies its position and offers “Use ISO-8859-1.” With that character set, “K%E4se” becomes “Käse” again. Characters not available in ISO-8859-1, such as “€”, can’t be encoded with it; switch back to UTF-8 for those.

No. Encoding and decoding happen in your browser; your text is neither uploaded nor stored. This also applies to URLs containing tokens or login credentials. The tool is free and requires no sign-up.

Any more questions?

Contact Support
Building something of your own?

Your application needs a server that reliably serves its URLs

A ZAP-Hosting VPS reliably puts your application or project online.

4.4/5 Trustpilot32,000+ Active serversSince 2010

No setup. No risk. Online in seconds.

Flexible TermCancel anytimeOnline in 60 seconds

Looking for more tools? View all developer tools