$base_string = base64_encode("your-string"); //for base64 encoding echo base64_decode($base_string); //for base64 decoding