</>

WebDevTools

Base64 Encoder/Decoder

Encode and decode text to Base64

Encode text to Base64 or decode back. Used in image data URIs, APIs transmitting binaries and storing binary data in safe text format.

Text Input

Characters: 0

Base64 Output

Characters: 0

Guide: encode and decode Base64 in the browser

Base64 encodes binary as ASCII text — common in Data URLs (`data:image/png;base64,…`), Basic Auth headers, and JSON-embedded blobs. Manual decoding often breaks on padding or charset.

Conversion runs fully client-side: short strings and small files never reach WebDevTools servers. File mode helps build Data URLs for prototypes without CDN uploads.

Use when debugging malformed tokens, inspecting API attachments, or HTML email placeholders. Remember Base64 adds ~33% size — it is not a production binary transport.

Step by step

  1. Choose text or filePaste UTF-8 for strings or pick a file to encode binaries (images, small PDFs).
  2. Pick encode or decodeEncode turns bytes into Base64; decode restores the original. Padding errors surface on decode.
  3. Check charset and URL-safeSome APIs need URL-safe Base64 (`-` and `_`). Toggle when the string comes from JWTs or query params.
  4. Copy the outputUse in inline image `src`, `Authorization` headers, or fixtures — never commit real secrets.

Frequently asked questions