Base64 Encoder
Encode text to standard or URL-safe Base64.
Processed locally in your browser. Nothing you enter is uploaded or stored.
- Standard or URL-safe encoding in one toggle — no manual character swapping for use in a URL, filename or JWT.
- UTF-8 aware, so emoji and accented characters round-trip correctly.
- Runs in your browser; nothing you type is uploaded.
Why this is private
- Processed locally in your browser. Nothing you enter is uploaded or stored.
- Open your browser's DevTools → Network tab while using this tool — you won't see a request carrying your input, because it never leaves your device.
- Nothing you enter is uploaded to a server or shared with us — the processing happens entirely on your device.
Overview
Converts text into a Base64 string — a common way to embed binary data inside JSON, URLs or HTML — in either standard or URL-safe (RFC 4648 §5) form.
How to use it
- 1Type or paste text.
- 2Toggle URL-safe if the result needs to go in a URL, filename or JWT segment.
- 3The Base64 output appears instantly.
- 4Copy it or download as .txt.
Examples
Text to Base64
Input
Hello, world!
Output
SGVsbG8sIHdvcmxkIQ==
URL-safe mode
Standard Base64 can contain `+`, `/` and `=` — all three break unencoded in a URL path or JWT segment. URL-safe mode swaps `+`→`-`, `/`→`_` and drops the `=` padding, so the result is safe to use as-is.
Input
Standard vs. URL-safe
Frequently asked questions
What people use it for
Embed a small image as a data URIBase64-encode an icon or SVG to inline it in CSS or HTML and save a request.
Build a URL, filename or JWT segmentURL-safe mode produces Base64 that doesn't need any further escaping to sit in a URL path, query param or filename.
Put binary data in a JSON fieldJSON can't hold raw bytes — Base64 lets you carry a key or token inside a string value.
Encode credentials for a Basic Auth headerBase64 the user:password string that goes after "Authorization: Basic".
Move text through a system that mangles symbolsEncoding sidesteps quoting and newline problems in shell vars, config files or query strings.
Related guides
- How to read JSON with a tree viewerA tree viewer turns a wall of brackets into a structure you can expand, search and copy paths from. Here's how to use one effectively.
- JSON parse errors explained: 'Unexpected token', 'Expected comma or brace', and the restWhat each common JSON error message actually means, the usual cause, and how to find the spot fast using line and column.
- How to format JSON (and actually understand the errors)JSON looks like a JavaScript object but follows stricter rules. Here's what those rules are and how to read the errors when they're broken.
Related tools
All developer toolsBase64 DecoderDecode Base64 strings back to text, images or files — including JWTs and data URIs.Base64 File EncoderEncode any file to a Base64 string or data URI.URL EncoderPercent-encode text for safe use in URLs, with a component vs. full-URL mode.Hash GeneratorGenerate MD5, SHA-1, SHA-256 and SHA-512 hashes, in hex or Base64, with a compare mode.
Ready to use Base64 Encoder?
Base64 Encoder