Developer utilities

Base64 encoder & decoder

Convert text and files with protocol-specific settings. All processing stays on your device.

Browser-based processingNo uploads or saved history
ToolBase64Change
Only in your browser
Which should I use?

Standard alphabet (+ /), padding when needed, no line breaks. Strict decoding checks characters, padding and unused bits.

RFC 4648 §4
0 B · UTF-8
0 B
Advanced settings Standard · padded · no wrapping

Changing a rule selects Custom. PEM fixes the alphabet, padding and line width; you can choose its line ending.

Ready. Your data stays in this browser.

UTF-8 text · files up to 10 MiB
No uploadsOptional traffic statisticsNo saved historyNo advertising

Base64 in your terminal

Linux command guide

Copy a GNU/Linux command and run it locally. Static examples, independent of your input.

Encode text, one line

printf '%s' 'Hello, world!' | base64 --wrap=0

printf adds no newline to the input. --wrap=0 keeps the encoded output on one line.

Output: SGVsbG8sIHdvcmxkIQ==

Decode Base64 text

printf '%s' 'SGVsbG8sIHdvcmxkIQ==' | base64 --decode

For known text input. A prompt may appear on the same line because the decoded bytes contain no trailing newline.

Output: Hello, world!

Encode a file

base64 --wrap=0 sample.bin > sample.b64

Reads the original bytes, including binary data. Replace sample.bin with your local filename.

Decode to a file

base64 --decode sample.b64 > restored.bin

Writes original bytes to disk. Use a different output filename; > replaces any existing output file. A failed decode can leave partial output.

Technical overview

How Base64 works

Base64 turns bytes into text that travels easily through JSON, email, and other text-based systems. Convert UTF-8 text or files here, then copy or save the exact result.

Standard Base64 uses A–Z, a–z, 0–9, + and /. Three bytes become four characters; = supplies padding when needed.

Guides & reference

All guides

From the blog

All articles →

Frequently asked questions

Is my input sent to a server?

No. This application converts in browser memory and does not transmit or save your input. The hosting provider receives ordinary page-request metadata when serving the website. Copying and downloading place data on your device. Read the full privacy explanation.

Does this work with emoji, other languages, and files?

Yes. Text is encoded as UTF-8, including emoji and non-Latin scripts. Files use their original bytes. Raw data is limited to 10 MiB; encoded input can be up to 20 MiB. Binary output can be downloaded without opening or executing it.

Can I use it offline?

After the converter and its scripts load, you can keep converting in the open tab without a connection. Reloading offline is not guaranteed. You can also run the command-line examples or self-host the source.

Is Base64 a way to encrypt data?

No. Base64 is reversible encoding with no secret key. Anyone can decode it. Use appropriate encryption and access controls for confidential data.

Are there keyboard shortcuts?

Use Ctrl + Enter (Command + Enter on macOS) to convert. Press Escape while focused inside the converter to clear input and output. Every control works with the keyboard.