    

 ## On this page

  

 

 # gRPC Scalar Value Types

 Last update: 17.07.2025 

.proto TypeNotesC++JavaPythonGoC#PHPRuby


<a name="double"> double</a>doubledoublefloatfloat64doublefloat


<a name="float"> float</a>floatfloatfloatfloat32floatfloat


<a name="int32"> int32</a>Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint32 instead.int32intintint32intinteger


<a name="int64"> int64</a>Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint64 instead.int64longint/longint64longinteger/string


<a name="uint32"> uint32</a>Uses variable-length encoding.uint32intint/longuint32uintinteger


<a name="uint64"> uint64</a>Uses variable-length encoding.uint64longint/longuint64ulonginteger/string


<a name="sint32"> sint32</a>Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s.int32intintint32intinteger


<a name="sint64"> sint64</a>Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s.int64longint/longint64longinteger/string


<a name="fixed32"> fixed32</a>Always four bytes. More efficient than uint32 if values are often greater than 2^28.uint32intintuint32uintinteger


<a name="fixed64"> fixed64</a>Always eight bytes. More efficient than uint64 if values are often greater than 2^56.uint64longint/longuint64ulonginteger/string


<a name="sfixed32"> sfixed32</a>Always four bytes.int32intintint32intinteger


<a name="sfixed64"> sfixed64</a>Always eight bytes.int64longint/longint64longinteger/string


<a name="bool"> bool</a>boolbooleanbooleanboolboolboolean


<a name="string"> string</a>A string must always contain UTF-8 encoded or 7-bit ASCII text.stringStringstr/unicodestringstringstring


<a name="bytes"> bytes</a>May contain any arbitrary sequence of bytes.stringByteStringstr\[\]byteByteStringstring