Session and utilities

The base64 command

Encodes data into safe text (only letters, numbers, + and /) and decodes it back. Useful to embed binaries in text.

Syntax

base64 [archivo] | base64 -d [archivo]

Most useful options

-dDecodes instead of encoding
-w NOutput line width

Copy-ready examples

$ echo hola | base64Encode
$ printf 'aG9sYQo=\n' > b64.txt && base64 -d b64.txtDecode

You can try them in the browser terminal: it does not touch your computer.

Typical mistakes

  • base64 does not encrypt or protect: anyone can decode it. It is not security.

Related commands

FAQ

Why is it so used on the internet?

Because it lets you send binary data inside text (email, JSON, HTML) without breaking it.

Learn to actually use it

The basic Linux course takes you from zero to console fluency with 24 self-grading lessons.

Start the free course