Base64 Encoder/Decoder
Encode and decode Base64 strings
About Base64
Base64 is a binary-to-text encoding scheme that represents binary data in ASCII string format. It's commonly used for encoding data in emails, URLs, and storing complex data in text format.
What is Base64 Encoder/Decoder?
The Base64 Encoder/Decoder is a free online tool that converts text to Base64 and back in an instant. Base64 is a binary-to-text encoding scheme that represents any data using a safe set of 64 ASCII characters, which makes it ideal for moving content through systems that only handle plain text — emails, URLs, JSON payloads, and data URIs. This tool encodes your input into Base64, decodes Base64 strings back into readable text, and automatically detects which direction you probably want. Beyond the basics, it supports the URL-safe alphabet (- and _ instead of + and /), optional padding, line wrapping at 64 or 76 characters for MIME and PEM payloads, a data: URI mode that wraps or detects a MIME type, and a bonus Hex conversion. It fully supports UTF-8, so accented letters, non-Latin scripts, and even emojis survive the round trip intact. Everything runs in your browser, so your data is never uploaded.
How to use Base64 Encoder/Decoder?
Encoding or decoding takes only a moment and happens entirely in your browser:
- 1 Type or paste any text into the input field. This can be plain text you want to encode, or an existing Base64 string you want to decode back to readable form.
- 2 Choose your options if you need them: pick the Standard or URL-safe alphabet, toggle = padding, set line wrap to 64 or 76 characters, or enable data: URI mode and set a MIME type.
- 3 Click Encode to convert your text into a Base64 string, or Decode to turn a Base64 string back into the original text. The tool also auto-detects which mode fits your input, accepts both alphabets, and restores missing padding automatically.
- 4 Copy the converted output to your clipboard with one click, ready to drop into an email, a data URI, an API request, or a configuration file. You can also use Text → Hex and Hex → Text for a hexadecimal round trip.
Why use this tool?
Many channels cannot safely carry raw binary or special characters, and Base64 solves this by producing an ASCII-safe string that travels intact through almost any system. Developers reach for it constantly: embedding images directly in HTML and CSS with data URIs, attaching files in emails, encoding credentials in HTTP headers, and packing binary blobs into JSON. The URL-safe variant matters when a token rides inside a query string or a JWT, where +, /, and = would otherwise need percent-encoding. Line wrapping keeps MIME (64) and PEM (76) payloads valid, and the Hex mode is handy for inspecting raw bytes. Decoding is just as useful for reading back values stored or transmitted in Base64. Because this tool processes everything locally in your browser, sensitive content is never sent to a server. It is fast, private, requires no signup, and handles UTF-8 text including emojis without corruption.
Examples
Enable data: URI mode with the right MIME type, encode an icon, and inline the resulting data: URI in your stylesheet, removing one extra network request.
Switch the alphabet to URL-safe and turn off padding to produce a token that drops straight into a query string or a JWT segment without escaping.
Paste a Base64 string such as SGVsbG8gV29ybGQ=, click Decode, and instantly recover the original text Hello World — even without the padding.
Encode a string containing accented letters or emojis and confirm the Base64 output decodes back to the exact original, proving full UTF-8 support.
Frequently Asked Questions
Is the Base64 tool free to use?
Yes. The encoder and decoder are completely free, with no signup, no limits, and no account required. You can convert as much text as you like.
Is my data sent to a server?
No. All encoding and decoding happen entirely in your browser, so your text is never uploaded or stored anywhere. The tool is safe for sensitive content.
What is URL-safe Base64?
URL-safe Base64 replaces + with - and / with _ so the string can sit inside a URL or a JWT without percent-encoding. You can also drop the trailing = padding. The decoder accepts both alphabets automatically.
Why would I wrap lines at 64 or 76 characters?
Email (MIME) bodies traditionally wrap Base64 at 64 characters, while PEM certificate blocks wrap at 76. The line-wrap option formats output to match these standards, and the decoder ignores the line breaks.
Is Base64 a form of encryption?
No. Base64 is encoding, not encryption. Anyone can decode it just as easily as you can, so it must never be used to protect passwords or secrets.
Does it support emojis and non-Latin text?
Yes. The tool fully supports UTF-8, so accented characters, non-Latin scripts, and emojis encode and decode correctly without any data loss.
Related Tools
Explore more free tools you might find useful