diff --git a/src/core/security/base64.c b/src/core/security/base64.c
index e68359602e6d6e070ffaf0d49e29374b057012de..0c3645788eb772f2fe9eb4bccdb6276fc27c4462 100644
--- a/src/core/security/base64.c
+++ b/src/core/security/base64.c
@@ -33,6 +33,7 @@
 
 #include "src/core/security/base64.h"
 
+#include <stdint.h>
 #include <string.h>
 
 #include <grpc/support/alloc.h>
@@ -41,7 +42,7 @@
 
 /* --- Constants. --- */
 
-static const char base64_bytes[] = {
+static const int8_t base64_bytes[] = {
     -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
     -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
     -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,