%url-decoder.net

%2C in a URL

The percent-encoded comma (,).

Short answer

%2C is the percent-encoded comma (,). A comma is a sub-delimiter that many APIs use to separate list items, so whether a comma in your data should be encoded depends on how the receiver splits the list.

Character
,
Percent-encoded
%2C
Byte value
0x2C = 44
RFC 3986 class
sub-delim
UTF-8 bytes
1

Where you will see it

  • Lists in query values: ids=1%2C2%2C3.
  • CSV-like parameters: fields=name%2Cemail.
  • Output of encodeURIComponent; encodeURI leaves commas alone.

What goes wrong

  • %2C and , decode to the same character, but a receiver that splits a list on a literal comma before percent-decoding treats them differently. If a value can contain a comma, encode it and confirm how the API reads lists.
  • A comma is legal unencoded in a query string, so a list written as ids=1,2,3 is valid. Encoding it is a style choice unless the API requires one form.

Decoded examples

EncodedDecodes toWhat it isOpen in the decoder
ids=1%2C2%2C3ids=1,2,3A comma-separated list with encoded commas.Open in decoder
name=Doe%2C%20Janename=Doe, JaneA name that contains a comma.Open in decoder

How each language encodes ,

Outputs below come from running each function, not from documentation. “Kept” means the function leaves the character as it is. Compare every character across every function.

LanguageFunctionOutput for ,
JavaScriptencodeURIComponent%2C
JavaScriptencodeURIkept
JavaScriptURLSearchParams%2C
JavaScriptescape (deprecated)%2C
Pythonquote (default safe='/')%2C
Pythonquote (safe='')%2C
Pythonquote_plus%2C
C#Uri.EscapeDataString%2C
C#WebUtility.UrlEncode%2C
C#HttpUtility.UrlEncode%2c

Questions

Should I encode commas in a query string?

It depends on the API. Commas are allowed unencoded, and many APIs expect lists as a,b,c. If a comma can appear inside a value, encode it so it is not mistaken for a list separator.

Is %2C the same as a comma?

After decoding, yes. Before decoding, a literal comma may be treated as a delimiter while %2C is plain data, depending on how the server parses the query.

Decode or encode your own text

Paste anything containing %2C. It runs in your browser; nothing is uploaded.

Related characters

All percent-encoded characters · Full percent-encoding table · What is URL encoding?

Behaviour checked against RFC 3986, the WHATWG URL Standard and MDN. Updated November 4, 2026