encoder · decoder · file · SVG · JWT
Auto

The Base64 Encoder / Decoder helps you quickly convert text/data to Base64 (and back).

Mode is detected automatically: paste text → Base64 encode; paste Base64 → decode. You can also drag & drop a file to encode it as a data URL and preview it when possible.

Charset
Variant
Wrap every 76 chars
Remove spaces/newlines
Mode
Input
Drop file here
convert
Output
Mode is detected automatically. Paste text → Base64 encode. Paste Base64 → decode. Drag & drop a file to encode it as a data URL.
SVG in CSS: background-image: url("data:image/svg+xml;base64,…") src="data:image/svg+xml;base64,…" or url-encoded (no Base64): data:image/svg+xml,URL-encoded
Fonts in CSS: src: url("data:font/woff2;base64,…") src: url("data:font/woff;base64,…") Image: data:image/png;base64,… data:image/jpeg;base64,… data:image/webp;base64,…
Decode JWT payload (header.payload.signature): Note: signature verification requires the private key.
WordPress REST API — Basic Auth: Authorization: Basic base64(user:pass) ACF encode field value for URL: URL encode URL decode input
MIME email — header charset: Subject: =?UTF-8?B?…?= Line wrap 76 chars (RFC 2045):

How to use the Base64 tool

  • Charset: choose UTF-8, Latin-1, or ASCII to control how bytes are interpreted.
  • Variant: standard or URL-safe (web friendly Base64).
  • Options: wrap to 76 characters and remove spaces/newlines in input.
  • Advanced output: image preview (PNG/JPEG/GIF/WebP) when decoding Base64 that contains image data.

In “How to use”, you get ready-to-copy examples: inline SVG in CSS, fonts in CSS, JWT decoding (header/payload only), and snippets for WordPress REST API Basic Auth.

Note: JWT signature verification requires the private key.