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
- Paste the UTF-8 text.
- Encode to Base64.
- 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
- Base64 DecoderDecode Base64 back into readable UTF-8 text so you can inspect tokens and payloads. Decoding never leaves this browser tab.
- URL EncoderPercent-encode query values and path segments with encodeURIComponent. Spaces become %20. Encoding stays in your browser.
- JSON FormatterPretty-print JSON with a chosen indent so API payloads are readable. Formatting runs in your browser and never leaves this tab.
- UUID GeneratorGenerate UUID version 4 values with the Web Crypto API. Create up to 500 identifiers at once, then copy or download the list.
- URL DecoderDecode percent-encoded URLs and query strings back to readable text. Invalid sequences are flagged without a network call.