Base64 encode
base64_encodeEncode UTF-8 text or files to Base64 with URL-safe alphabet, MIME 76-column wrapping, or data URI output. Large results are written to a file instead of returned inline.
Instructions
Encode text (as UTF-8) or a file (path or base64) to Base64. Options: URL-safe alphabet (- and _, no padding), wrap at 76 columns (MIME), or a data: URI for files (MIME type detected from magic bytes). Results over 1 MB, or when "output" is given, are written to a text file instead of returned inline. Web version: https://s3eidat.github.io/base64-kit/
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file | No | Or: a file to encode: local path or base64 data. | |
| text | No | Text to encode (UTF-8). | |
| wrap | No | Insert a line break every 76 characters (MIME style). | |
| output | No | Where to write the result: a file path, or a folder ending in "/". Default: the server output folder (a temp folder unless --out-dir is set). | |
| dataUri | No | Return a data: URI (data:<mime>;base64,…) instead of bare Base64. | |
| urlSafe | No | Use the URL-safe alphabet (- and _) and drop "=" padding. |