| Go provides built-in support for base64 encoding/decoding. | |
![]() | |
| This syntax imports the | |
| |
| Here’s the | |
| Go supports both standard and URL-compatible base64. Here’s how to encode using the standard encoder. The encoder requires a | |
| Decoding may return an error, which you can check if you don’t already know the input to be well-formed. | |
| This encodes/decodes using a URL-compatible base64 format. | |
| The string encodes to slightly different values with the standard and URL base64 encoders (trailing | |
|
Next example: Reading Files.