About Base64 Encode and Decode
Base64 encode text when a system only accepts plain ASCII, or decode the Base64 you find in one: an API header, a JSON field that has to carry a small file, a basic-auth string, or a config value with special characters. Paste the text and the Base64 appears as you type. Switch to Decode to turn Base64 back into readable text.
Text is encoded as UTF-8, so Chinese, accents and emoji come back intact. Tick URL-safe for the variant with - and _ and no padding, used in JWTs and URLs. Decoding accepts line breaks, data URIs and missing padding. If the result is a file rather than text, such as a PDF or an image, you get its size and a Save the file button. Encode a file turns any file into a data URL.
How to use Base64 Encode and Decode
- 1Choose Encode or Decode
Pick the direction, and tick URL-safe if the Base64 is for a URL or a token.
- 2Add text or a file
Type or paste into Input, or click Encode a file to turn a file into a data URL.
- 3Copy or save
Copy the Base64 encode or decode result, or download decoded files with Save the file.
Why use Cubfile for this
- UTF-8 safe
Any language and emoji survive the round trip.
- URL-safe variant
Uses - and _ instead of + and / and drops the = padding.
- Decodes to files
Binary results are offered as a download, with the extension taken from a data URI.
- Tolerant decoding
Line breaks, spaces, data URI prefixes and missing padding are handled for you.