Thursday, January 22, 2026
HomeLanguagesbase64.b85encode() in Python

base64.b85encode() in Python

With the help of base64.b85encode() method, we can encode the string by using base85 alphabet into the binary form.

Syntax : base64.b85encode(string)

Return : Return the encoded string.

Example #1 :
In this example we can see that by using base64.b85encode() method, we are able to get the encoded string which can be in binary form by using this method.




# import base64
from base64 import b85encode
  
s = b'GeeksForGeeks'
# Using base64.b85encode() method
gfg = b85encode(s)
  
print(gfg)


Output :

b’M`dMeb4G7+M`dMea{‘

 
Example #2 :




# import base64
from base64 import b85encode
  
s = b'I love python'
# Using base64.b85encode() method
gfg = b85encode(s)
  
print(gfg)


Output :

b’Ng!-*c4Z)Nd30!RZU’

Dominic
Dominichttp://wardslaus.com
infosec,malicious & dos attacks generator, boot rom exploit philanthropist , wild hacker , game developer,
RELATED ARTICLES

Most Popular

Dominic
32475 POSTS0 COMMENTS
Milvus
119 POSTS0 COMMENTS
Nango Kala
6847 POSTS0 COMMENTS
Nicole Veronica
11977 POSTS0 COMMENTS
Nokonwaba Nkukhwana
12064 POSTS0 COMMENTS
Shaida Kate Naidoo
6986 POSTS0 COMMENTS
Ted Musemwa
7220 POSTS0 COMMENTS
Thapelo Manthata
6933 POSTS0 COMMENTS
Umr Jansen
6912 POSTS0 COMMENTS