Tool guide
About this tool.
Base64 represents bytes as printable ASCII text so they can be carried by formats or protocols that expect text instead of raw bytes.
Text mode uses UTF-8, preserving characters such as č and 🐎; File mode works directly with original bytes, including images and PDFs.
Every group of three bytes becomes four Base64 characters, making the encoded data roughly one-third larger before padding.
Base64 is encoding, not encryption or compression; it does not protect the original content.
- Encode UTF-8 text for an API field or text-only format that explicitly requires Base64.
- Decode a Base64 text value from a log, test fixture or payload to inspect its original content.
- Encode a local image, PDF or other file for a text-only payload, or recover a file from Base64 or a Base64 Data URI.
- Use URL-safe mode to inspect the JSON header or payload of a signed JWT, one segment at a time; use the JWT Parser for a complete token.
Choose Text or File, then Encode or Decode and the alphabet used by the source or destination.
Encoding uses UTF-8, preserving spaces and line breaks.
In File → Encode, choose or drop a local file and select Base64 or Data URI output; run, copy or save the result, then switch output format if needed.
In File → Decode, paste Base64 or a Base64 Data URI, optionally choose a download filename, then run and save the recovered file; supported raster images show a preview.
Decoding ignores whitespace around Base64 characters and accepts valid padded or unpadded input.
Use “Use result & reverse” to switch direction with the text result or recovered file bytes; this never converts a binary file through UTF-8.
- Standard encode: hello → aGVsbG8=
- Standard decode: aGVsbG8= → hello
- URL-safe encode: Hi? → SGk_ (standard: SGk/)
- File decode: /w== → a one-byte file containing FF, not UTF-8 text.
- Data URI decode: data:application/pdf;base64,JVBERi0xLjcKJSBERU1P → PDF-header demo bytes, not a complete PDF document.
- Base64 is encoding, not encryption. Anyone can decode it; do not use it to protect secrets.
- Text mode rejects non-UTF-8 bytes. Choose File to preserve binary data instead.
- Standard and URL-safe alphabets are explicit; the tool does not guess or mix them. Invalid padding and non-canonical encodings are rejected.
- File mode supports one file up to 10 MiB. Plain Base64 contains no original name or media type; signatures provide only a suggested type, not a file-integrity check.
- Data URIs use standard Base64 and carry media type metadata. Preview is limited to recognizable PNG, JPEG, GIF and WebP bytes; HTML, SVG, PDF and other files are download-only.
- Files stay local and are not stored in VS Code drafts. Clear removes current inputs and results; saving or opening a recovered file is your explicit action.