Base64 Encoder/Decoder — Encode and Decode Base64 Strings Instantly
Encode text to Base64 format or decode Base64 strings back to plain text.
What Is Base64 Encode / Decode?
Encode text to Base64 format or decode Base64 strings back to plain text.
Base64 is an encoding scheme that converts binary data — images, files, or any byte sequence — into a string of 64 printable ASCII characters. The need for Base64 arises because many protocols (email, HTTP, JSON) were designed to handle text, not raw binary.
Embedding an image in HTML as a data URI, passing binary authentication tokens through a JSON API, or encoding email attachments are all common applications. Important to understand: Base64 is encoding, not encryption — the output is easily reversed by anyone who has it. Use it only for safe text transport of binary content, never for hiding or protecting data.
Hello World→SGVsbG8gV29ybGQ=When to Use the Base64 Encode / Decode
- →Inlining images in HTML and CSS as data URIs — base64-encoded images can be embedded directly (data:image/png;base64,...) eliminating extra HTTP requests
- →Decoding JWT tokens — JSON Web Tokens use base64url encoding for their header and payload; decoding reveals the token claims for debugging
- →Passing binary data through JSON APIs — REST APIs cannot send raw binary in JSON; Base64 allows images and files to be embedded in JSON payloads
- →Encoding email attachments — email protocols like MIME encode file attachments in Base64 to safely transmit binary over text-based protocols
- →HTTP Basic Authentication — Basic Auth headers encode "username:password" in Base64 before sending in the Authorization header
How to Use the Base64 Encode / Decode
- Select Encode or Decode using the toggle buttons.
- Paste your text into the Input Text box.
- The result appears instantly on the right.
- Click Copy to copy the output to your clipboard.
Frequently Asked Questions
Everything you need to know about Base64 Encode / Decode
Base64 is an encoding scheme that converts binary data or text into a string of ASCII characters — using letters, numbers, +, /, and = as padding. It is used when text-safe transport is required.