Base64 Encoder / Decoder
Encode text to Base64 or decode it back, with full Unicode and URL-safe support.
Processed locally
Conversion happens instantly as you type. Use Swap to reverse it.
Instructions
How to use it
- 01Choose Encode to turn text into Base64, or Decode to turn Base64 back into text.
- 02Type or paste into the left box. The result appears instantly on the right.
- 03Press Swap to move the result into the input and flip the direction.
- 04Copy the output with one click.
About
What it does
Base64 represents any data using 64 safe characters (A–Z, a–z, 0–9, + and /). It's used to embed images in CSS and HTML, carry binary data in JSON and email, and inside tokens such as JWTs and HTTP Basic authentication headers.
The browser's built-in btoa() breaks on anything outside basic Latin characters. This converter encodes your text as UTF-8 first, so Grüße 👋 works just as well as hello, and it decodes back the same way.
Settings explained
- URL-safe
- Uses - and _ instead of + and / and drops the = padding (base64url), so the result is safe in URLs, file names and JWTs.
- Decoding
- Whitespace and line breaks are ignored, missing padding is tolerated, and both standard and URL-safe alphabets are accepted.
Good for
- Reading the payload of a JWT or an encoded API field
- Encoding credentials for an HTTP Basic auth header
- Embedding small text snippets in config or JSON
- Checking what an encoded string in a log actually says
Questions, answered
- Is Base64 encryption?
- No. Base64 is an encoding, not encryption. Anyone can decode it, so never use it to hide passwords or secrets.
- Does it work with emoji and non-English text?
- Yes. Text is converted to UTF-8 bytes before encoding and decoded back as UTF-8, so accents, emoji and every writing system round-trip perfectly.
- Why does decoding say my data isn't text?
- The input is valid Base64, but the bytes inside aren't UTF-8 text. It probably contains binary data such as an image, a compressed file or encrypted content.
- How do I convert an image to Base64?
- Use the Image to Base64 tool, which reads the file directly and can produce a ready-to-use data URI.
Related tools
All encoding tools (3)- Image to Base64Encode an image as a Base64 string or data URI, ready for CSS, HTML or JSON.
- URL Encoder / DecoderPercent-encode text for URLs or decode it back, including emoji and non-Latin scripts.
- HTML Escape / UnescapeEscape HTML special characters so code displays safely, or turn entities back into text.
- SHA-256 Hash GeneratorCreate SHA-256 hashes of text or files using your browser's built-in cryptography.