fileformer
search⌘KtranslateENexpand_moreupload_fileConvert
Converters8 file families · 44 direct conversions
What changes in a conversionarrow_forward
home/developer-tools/url-encoder

Free URL Encoder & Decoder Online

Take a link apart, fix it, and put it back together.

Paste any URL to see every part labelled and the query decoded into a table you can edit. Spaces, accents and symbols are encoded correctly as you type, and tracking tags can be stripped in one click.

urlcontains unencoded characters
https://shop.example.com:8443/search/running shoes?q=trail+runners&size=10&colour=grün&utm_source=newsletter&utm_medium=email&fbclid=IwAR2x#reviews
schemehttps:how to connect; https is encryptedhostshop.example.comthe server to askport8443rarely needed; default is 443path/search/running shoeswhich page on that serverquery6 parametersextra settings, as key=value pairshashreviewsa spot on the page; never sent to the server
Query parameters · 6
cleaning_servicesRemove 3 tracking tagsaddAdd
keyvalue (decoded)
This URL has no query string. Add a parameter to start one.
close
close
close
close
close
close
Highlighted keys (utm_source, utm_medium, fbclid) only tell the site where you clicked from. Removing them doesn’t change the page.
clean, encoded URLcontent_copyCopyhttps://shop.example.com:8443/search/running%20shoes?q=trail+runners&size=10&colour=gr%C3%BCn&utm_source=newsletter&utm_medium=email&fbclid=IwAR2x#reviews
without trackingcontent_copyCopyhttps://shop.example.com:8443/search/running%20shoes?q=trail+runners&size=10&colour=gr%C3%BCn#reviews
decoded, human-readablecontent_copyCopyhttps://shop.example.com:8443/search/running shoes?q=trail runners&size=10&colour=grün&utm_source=newsletter&utm_medium=email&fbclid=IwAR2x#reviews
~/percent-signs

Why "café & crème" turns into caf%C3%A9%20%26%20cr%C3%A8me

A URL can only contain a small set of plain characters. Everything else is converted to UTF-8 bytes and written as % plus two hex digits. Type anything and see each character's journey; characters that would break the URL are highlighted.

encodeURIComponentencodeURI
c63ca61af66féC3 A9%C3%A9␣20%20&26%26␣20%20c63cr72rèC3 A8%C3%A8m6Dme65e␣20%20/2F%2F␣20%2053550300%25%25
for one value: a query value or a path segmentcaf%C3%A9%20%26%20cr%C3%A8me%20%2F%2050%25
Encodes everything except letters, digits and - . _ ~. The & and / become %26 and %2F, so they can’t be mistaken for separators. Use this for each value you put into a URL.
~/broken-links

Four links that break, and why.

Each one looks fine to a person and wrong to a browser. Load any of them into the inspector above to see exactly where it goes wrong.

A space in the linkhttps://example.com/my file.pdfEmail and chat apps end the link at the space, so the click goes to /my.https://example.com/my%20file.pdfuploadInspect it
An & in a valuehttps://example.com/?q=salt&pepperThe & starts a new parameter, so the search is for “salt” and there’s a stray “pepper”.https://example.com/?q=salt%26pepperuploadInspect it
Double-encodedhttps://example.com/?city=S%25C3%25A3o%20PauloEncoded twice, so % became %25. The site receives “S%C3%A3o Paulo” as text.https://example.com/?city=S%C3%A3o%20PaulouploadInspect it
A # in a valuehttps://example.com/?tag=#designEverything after # is treated as a page anchor and never sent, so tag is empty.https://example.com/?tag=%23designuploadInspect it
~/two-parsers-one-link

Two URL standards, and they don't always agree on where a link goes.

RFC 3986 is the internet standard most servers, proxies and libraries follow. Browsers follow the WHATWG URL Standard, which also repairs sloppy links: backslashes, stray tabs, odd IP address forms. The left column below uses the RFC's own regular expression; the right one is your browser's real new URL(). When the two disagree on the host, a link checker and a browser can end up on different servers, which is how several real attacks worked.

credentials trickbackslashmessy but finehex IPdecimal IPinternationalhidden tabspace in hostjavascript:
warningSame server, misleading textBoth parsers agree the host is evil.example, but a reader may think it’s example.com.
partRFC 3986browser (WHATWG)
schemehttpshttps
userinfoexample.comexample.com
hostevil.exampleevil.example
portnonenone
path/login/login
querynonenone
fragmentnonenone
BROWSER’S SERIALISED HREF · ORIGIN https://evil.examplehttps://example.com@evil.example/login
what the browser changedperson_alertEverything before the @ is a username, not the site. This link goes to evil.example, and browsers usually hide or warn about the username.northLoad into the inspector
~/which-characters-get-encoded

Eight encoders, eight different answers for the same 95 characters.

There's no single “URL encoding”. Each part of a URL has its own set of characters that must be escaped, and JavaScript's functions each pick a different set. Your browser just ran every printable ASCII character through all eight. Click a row to see its grid.

encoderescapedaltered“é 😀” becomes
encodeURIComponent240%C3%A9%20%F0%9F%98%80
encodeURI130%C3%A9%20%F0%9F%98%80
escape() (deprecated)260%E9%20%uD83D%uDE00
URLSearchParams281%C3%A9+%F0%9F%98%80
URL path112%C3%A9%20%F0%9F%98%80
URL query60%C3%A9%20%F0%9F%98%80
URL fragment50%C3%A9%20%F0%9F%98%80
URL username200%C3%A9%20%F0%9F%98%80
␣%20!·"%22#%23$%24%%25&%26'·(·)·*·+%2B,%2C-·.·/%2F0·1·2·3·4·5·6·7·8·9·:%3A;%3B<%3C=%3D>%3E?%3F@%40A·B·C·D·E·F·G·H·I·J·K·L·M·N·O·P·Q·R·S·T·U·V·W·X·Y·Z·[%5B\%5C]%5D^%5E_·`%60a·b·c·d·e·f·g·h·i·j·k·l·m·n·o·p·q·r·s·t·u·v·w·x·y·z·{%7B|%7C}%7D~·
left as ispercent-escapedturned into something else
encodeURIComponent: 24 of 95 escaped, 0 altered. Escapes everything except A, Z, a, z, 0-9 and - _ . ! ~ * ’ ( ). The safe choice for a single query value or path segment. It leaves ! ’ ( ) * alone, which RFC 3986 reserves, so strict servers may want those escaped too.
~/reference

Schemes, special rules and length limits.

The URL Standard treats six schemes as “special”: they get a lowercased host, backslash repair, dot-segment cleanup and dropped default ports. Every other scheme keeps its host exactly as written. The last three columns were checked in your browser.

schemeportspecialport droppedoriginused for
http80yesyeshttp://h.exampleWeb pages over plain TCP
https443yesyeshttps://h.exampleWeb pages over TLS
ws80yesyesws://h.exampleWebSocket
wss443yesyeswss://h.exampleWebSocket over TLS
ftp21yesyesftp://h.exampleFile transfer; browsers removed support in 2021
file-yes-file://Local files; the origin is opaque in most browsers
mailto-no-nullEmail addresses; no host at all
data-no-nullInline content, often Base64
blob-no-https://h.exampleIn-memory objects made by the page; inherits the page’s origin
javascript-no-nullRuns script when followed; a classic XSS vector

How long can a URL be?

No standard sets a maximum. The practical limit is the smallest one along the way, so links meant to be shared should stay under about 2,000 characters.

8,000RFC 9110 minimumHTTP recommends that senders and recipients support request lines of at least 8,000 octets.
2,083Internet ExplorerThe old IE limit that made “about 2,000” the folk rule. It still applies in some embedded browsers.
2 MBChromeChrome stores URLs up to 2,097,152 characters, but shows at most 32 KB in the address bar.
8,190Apache defaultLimitRequestFieldSize and LimitRequestLine default to 8,190 bytes. Longer requests get 414 URI Too Long.
8 KBnginx defaultlarge_client_header_buffers defaults to 4 buffers of 8 KB; the request line has to fit in one.
2,048SitemapsThe sitemaps.org protocol requires each URL to be under 2,048 characters.

From RFC 1738 to the URL Standard

1994RFC 1738Tim Berners-Lee and others standardise URLs, including percent-encoding.
1998RFC 2396A general URI syntax replaces the scheme-by-scheme rules.
2003IDNARFC 3490 lets domain names use any script, encoded as Punycode (xn--).
2005RFC 3986 and 3987The current URI syntax, plus IRIs for Unicode in URLs.
2010IDNA2008RFC 5891 revises the rules for international domains; UTS #46 bridges old and new.
2012URL StandardWHATWG starts documenting how browsers really parse URLs.
2017Parser confusionOrange Tsai’s Black Hat talk shows SSRF attacks built on libraries that disagree about hosts.
2023URL.canParse()A static check lands in browsers and Node, so code can validate without try/catch.