Base64 Encoder and Decoder
Encode UTF-8 text to Base64 or decode Base64 and Base64URL strings back to text in your browser.
Encode and decode Base64 text
Use this Base64 encoder and decoder for UTF-8 text, API snippets, small JSON fragments, JWT header or payload segments, and other text-safe binary-to-text workflows.
- Encode plain text to standard Base64.
- Decode standard Base64 back to UTF-8 text.
- Switch to Base64URL for URL-safe strings and JWT-style segments.
- Keep or omit padding depending on the target system.
Base64URL and padding
RFC 4648 defines the standard Base64 alphabet and the URL-safe Base64URL alphabet. Base64URL replaces + and / with - and _, and many JWT workflows omit.
Base64URL changes the alphabet for URLs and filenames, but it is still not encryption and does not protect the decoded content.
| Mode | Alphabet difference | Common use |
|---|---|---|
| Base64 | + and / with | MIME, API payloads, data URIs, text transport |
| Base64URL | - and _ with often omitted padding | JWT, URL parameters, filename-safe tokens |
L is encoded length with padding, and n is input byte length.
Base64 is not encryption
For secrets, use encryption or authentication-specific tooling. For fingerprints, use a hash generator. Base64 only changes how bytes are represented as text.
Frequently Asked Questions
Sources and References
Calculations are based on the listed reference sources. Links open in a new tab.
Related Tools
Format, validate, and minify JSON in your browser with indentation controls, syntax errors, and simple structure stats.
Generate MD5, SHA-1, SHA-256, SHA-384, and SHA-512 hashes for text or a local file directly in your browser.
Test JavaScript regular expressions with flags, matches, capture groups, named groups, highlighting, and replacement preview.
Generate a strong random password in your browser with length, character set, strength estimate, and one-click copy.
Generate UUID v4 and GUID-style identifiers in bulk, with uppercase, no-dash, and brace formatting options.