@app.route('/base64/<value>')
def decode_base64(value):
 encoded = value.encode('utf-8')
 return base64.urlsafe_b64decode(encoded).decode('utf-8')

@ app . route ( '/base64/<value>' ) def decode_base64 ( value ) : encoded = value . encode ( 'utf-8' ) return base64 . urlsafe_b64decode ( encoded ) . decode ( 'utf-8' )
decodes base64url-encoded string .