%3A is the URL-encoded colon (:).

In a URL, %3A stands for the colon (:). Here is when to encode it, what it does in each part of a URL, and what every major language outputs.

Quick facts

Character:
NameColon
UnicodeU+003A
UTF-8 bytes3A (1 byte)
Percent-encoded%3A
Lowercase form%3a — identical meaning
Double-encoded%253A
HTML form encoding%3A
RFC 3986 classReserved — general delimiter

What it means in a URL

The colon separates the scheme (https:), the port (:8080) and the user name from the password. Inside a path or query it is allowed raw, but most encoders produce %3A — which is what you see in an encoded https%3A%2F%2F….

RFC 3986 class: Reserved — general delimiter. It marks the structure of a URL (scheme, authority, path, query, fragment), so as data it must be encoded.

When to encode it

Where it appearsWhat to do
Path segmentAllowed raw (encoding is also fine)
Query valueAllowed raw (encoding is also fine)
FragmentAllowed raw
Form bodyEncode

The mistake to watch for

A relative path whose first segment contains a colon, such as c:/file, is read as a URL with scheme c. Encode it or prefix ./.

What each language produces

Left as-is by JavaScript encodeURI(s), Go url.PathEscape(s); every other function in the table encodes it. Output for the single character, UTF-8 input, tested against the real runtimes (see the encoding comparator for your own strings).

FunctionOutput
JavaScript encodeURIComponent(s)%3Aencoded
JavaScript encodeURI(s):kept
JavaScript URLSearchParams%3Aencoded
Python urllib.parse.quote(s)%3Aencoded
Python quote(s, safe="")%3Aencoded
Python urllib.parse.quote_plus(s)%3Aencoded
PHP rawurlencode($s)%3Aencoded
PHP urlencode($s)%3Aencoded
Java URLEncoder.encode(s, UTF_8)%3Aencoded
Go url.QueryEscape(s)%3Aencoded
Go url.PathEscape(s):kept
Ruby URI.encode_www_form_component(s)%3Aencoded
Ruby ERB::Util.url_encode(s)%3Aencoded
C# / .NET Uri.EscapeDataString(s)%3Aencoded

Decoding it

decodeURIComponent('%3A') returns the colon (:). Python: urllib.parse.unquote('%3A'); PHP: rawurldecode('%3A'). Paste any string into the URL decoder to decode it in your browser.

← %2F Slash (forward slash)  ·  Full URL encoding table  ·  %3B Semicolon →

Common questions.

%3A is the percent-encoded form of the colon (:), whose byte value is 0x3A. Decoding the URL turns it back into the character.

Yes. Hex digits in percent-encoding are case-insensitive, so %3a and %3A mean the same thing. RFC 3986 recommends uppercase, and mixing cases can make caches and analytics count one URL as two.

Use your language’s encoder on the value: encodeURIComponent in JavaScript gives %3A, Python’s quote(s, safe="") gives %3A, PHP’s rawurlencode gives %3A.

More from the toolkit.

About this page. Written and maintained by Sri Murugan Systems, the developer of urlencodedecode.com. Character classes follow RFC 3986 §2; language outputs were generated by running each function in its real runtime.