RH
Tool

URL Encoder

Encode and decode special characters in URLs

Client-side processing
0 caracteres
0 caracteres
Info

Online URL Encoder and Decoder - Percent Encoding

What is URL encoding (percent encoding) and why do you need it?

URL encoding, also known as percent encoding, is the standard mechanism for encoding information inside a Uniform Resource Identifier (URI). It is essential because URLs may only contain a limited set of ASCII characters: letters, digits and a handful of symbols. Special characters, spaces, accents and symbols must be converted to a safe form using a percent sign (%) followed by two hexadecimal digits representing the byte value. A space, for example, is encoded as %20.

Which characters must always be URL encoded?

The reserved characters that always require encoding include spaces (turned into %20, or + in form submissions), question marks (?), ampersands (&), equals signs (=), slashes (/), colons (:), at signs (@), hash marks (#), square brackets ([ ]) and percent signs (%). On top of that, every non-ASCII character such as accented letters, the Spanish n with tilde, umlauts and characters from other writing systems (Chinese, Arabic, Russian) must be encoded to guarantee universal compatibility between browsers and servers.

Practical uses of a URL encoder for developers

A URL encoding tool is indispensable for web developers working with query strings in dynamic URLs, building links for marketing campaigns and UTM tracking, integrating with REST APIs that accept data in the URL, handling web forms submitted with method GET, developing SPAs that use hash-based routing, generating share links for social networks, and any situation where you need to pass data containing special characters through the browser address bar.

If you work with this tool, you will probably also find these useful Slug Generator, Text Escaper, Base64 Encoder, JWT Decoder.

Frequently asked questions

What is the difference between encodeURI and encodeURIComponent in JavaScript?

encodeURI() encodes a full URL while preserving the special characters that make up the structure of the URL (such as : / ? # @ & =), so it is the right choice for encoding a complete URL. encodeURIComponent() encodes EVERY character except letters, digits and - _ . ~, which makes it the correct option for encoding individual parameter values that will be inserted into a URL. Picking the wrong function can break your URLs or open up injection vulnerabilities.

Why are spaces sometimes encoded as + and sometimes as %20?

Historically, HTML forms submitted with method GET encode spaces as + following the application/x-www-form-urlencoded format. The RFC 3986 standard, however, specifies that spaces must be encoded as %20 in URLs. Both forms are valid in their own context: use + for traditional form data and %20 for modern URLs and REST APIs. This tool lets you pick the format that fits your use case.

Can I use Unicode characters and emoji in URLs?

Yes, but they must be encoded correctly. Unicode characters, emoji included, are first converted to their UTF-8 representation (a byte sequence) and then each byte is encoded as %XX. A heart emoji, for example, takes up 4 bytes in UTF-8. Modern browsers display these characters decoded in the address bar for readability, but internally they send the encoded version to the server.

© 2026
Roberto Hernando
|