Skip to content
PocketCaliper
Language
Open menu

Runs locally in your browser

Base64 Encoder

Encode UTF-8 text to Base64 for data URIs, headers, and embeds. Encoding uses the Web APIs in this tab, with no server hop.

Paste plain text when you need the Base64 form for an Authorization header, a data URL, or a config value. This page only encodes.

TextEncoder and btoa run in the browser so the source string never travels to encode.

How to use

  1. Paste the UTF-8 text.
  2. Encode to Base64.
  3. Copy the encoded string.

How it works

The string is encoded as UTF-8 bytes, then those bytes become ASCII Base64. Emoji and non-Latin letters survive the round trip when you decode later.

This encoder does not wrap lines at 76 characters. Paste the output as a single token unless a spec asks otherwise.

Examples

  • Basic auth fragment

    Encoding user:token yields a Base64 blob you can place after the Basic keyword in a header.

  • Data URI prefix

    A small SVG as text can be encoded, then prefixed with a data URI for SVG plus Base64, for an inline image.

FAQ

Can I encode a file?

This page encodes text you paste. Binary files need another workflow.

Is this URL-safe Base64?

No. It is standard Base64 with plus and slash. Swap those characters if a spec requires URL-safe.

Does encoding hide secrets?

No. Base64 is encoding, not encryption. Anyone can decode it.

Does the text leave the tab?

No. Encoding is client-side.

Related tools