Text to Base64
Input: Hello, World!
Output: SGVsbG8sIFdvcmxkIQ==The Base64 Encoder/Decoder converts text and data to and from Base64 representation. Type or paste plain text to get its Base64-encoded form, or paste a Base64 string to decode it back to readable text. Everything runs in your browser, so the data you enter never leaves your machine. Base64 is widely used to embed images in CSS or HTML data URIs, encode binary attachments in email, store credentials in HTTP headers, and safely transport binary content through systems that expect text.
Base64 is a binary-to-text encoding scheme, standardized in RFC 4648, that represents binary data using 64 printable ASCII characters (A-Z, a-z, 0-9, plus + and /). It works by grouping input bytes into 6-bit chunks, each mapped to one character, with = used as padding. Importantly, Base64 is encoding, not encryption: it provides no secrecy or security, since anyone can decode it trivially. There is also a URL-safe variant that replaces + and / with - and _ so the output can appear in URLs and filenames.
The main file is the entry point for each run.
Use the Input panel to pipe standard input to your program when it needs data.
Run sends your code to a fresh hosted runtime and streams the result into the output panel.
Your draft stays in this browser, and Share creates a separate snapshot link.
Input: Hello, World!
Output: SGVsbG8sIFdvcmxkIQ==Input: Q29tcGlsZUJ5dGVz
Output: CompileBytesInput: hi
Output: aGk=
The trailing "=" pads the output so its length is a multiple of 4.Standard: +/+/
URL-safe: -_-_
The same 3 bytes (0xFB 0xFF 0xBF) encode to "+/+/" in standard Base64 and "-_-_" URL-safe: "+" becomes "-" and "/" becomes "_".Input: Man -> Output: TWFu (3 bytes, no padding)
Input: Ma -> Output: TWE= (2 bytes, one '=')
Input: M -> Output: TQ== (1 byte, two '=')
Every 3 input bytes map to 4 Base64 chars; padding fills the final group.Input: user:pass
Output: dXNlcjpwYXNz
Used as: Authorization: Basic dXNlcjpwYXNz
It is only encoded, not encrypted — anyone can decode it.Input: café
Output: Y2Fmw6k=
The "é" becomes UTF-8 bytes 0xC3 0xA9 before encoding, so decoding restores "café".Input: Zm9vYmFy
Output: foobar
Each group of 4 Base64 chars decodes back to 3 bytes; "Zm9vYmFy" has no padding, so it is exactly 6 bytes.Input: sure. -> Output: c3VyZS4= (5 bytes, one '=')
Input: sure -> Output: c3VyZQ== (4 bytes, two '=')
Adding one character shifts which group needs padding, changing the '=' count.The editor uses Monaco, the engine behind VS Code, with language-aware editing tools and familiar keyboard controls.
Type or paste plain text to get its Base64-encoded form
Paste a Base64 string to decode it back to readable text
Conversion updates as you edit, no upload required
Standard Base64 alphabet (A-Z, a-z, 0-9, + and /)
URL-safe variant swaps + and / for - and _ for URLs and filenames
Handles padding with = automatically
Everything runs in your browser and the data you enter never leaves your machine
Note: Base64 is encoding, not encryption, so it provides no secrecy
Embedding images in CSS or HTML data URIs
Encoding header values or transporting binary as text
Encoded output
will appear here