A URL can only carry a limited set of characters directly — letters, digits, and a handful of unreserved symbols. Spaces, accented letters (like é, ü, ñ), emoji, and & ? # % + = — the reserved characters that give a URL its structure — must first be converted to %XX form, a process called percent-encoding or, more commonly, URL encoding. The reverse operation is URL decoding. The tool above handles both directions, plus query string parsing/building, full URL parsing, and Base64, all instantly in your browser.
What's the difference between encodeURIComponent and encodeURI?
& = ? / : #, which is why it's the right choice for parameter values. encodeURI() is for encoding an ENTIRE address; it leaves the characters a URL needs to function — : / ? # & = — untouched.- encodeURIComponent("a&b=c") →
a%26b%3Dc(& and = are also encoded — correct for a single parameter VALUE) - encodeURI("https://x.com/a b?c=1&d=2") →
https://x.com/a%20b?c=1&d=2(only the space is encoded; the URL structure is preserved)
How are accented characters and emoji encoded in a URL?
%XX value. For example, é is 2 bytes and becomes %C3%A9; a 4-byte emoji becomes four separate %XX groups. You never need to calculate this by hand — encodeURIComponent() does it automatically.| Character | Meaning | Encoded form |
|---|---|---|
| (space) | Space character | %20 (or + in forms) |
| é | Accented letter, e.g. café | %C3%A9 |
| ü | Accented letter, e.g. Zürich | %C3%BC |
| & | Parameter separator | %26 |
| = | Key-value separator | %3D |
| ? | Start of the query string | %3F |
| # | Start of the fragment/anchor | %23 |
| % | The percent sign itself | %25 |
| 🚀 | Emoji (4-byte UTF-8) | %F0%9F%9A%80 |
How do you build and parse a query string?
key=value pairs that follow the ? in a URL, separated by &. The "Build Query" tab above lets you enter key-value pairs and generates a correctly percent-encoded query string; the "Parse Query" tab takes an existing URL and turns every parameter into a readable table. The tool also automatically flags well-known tracking parameters like utm_source, gclid, and fbclid.How is Base64 encoding different from URL encoding?
+ and /, it sometimes needs an additional pass of encodeURIComponent() before it can go into a URL parameter — try both in the mini tools section below.