Base64 guide: UTF-8 text, URL-safe encoding and decoding errors
Use this tool for text snippets, JSON and development examples. It converts text through UTF-8 bytes and displays decoded UTF-8 text. It does not upload files or reconstruct images, PDFs or arbitrary binary data.
Base64 is encoding, not encryption
Base64 represents bytes using a text alphabet. Anyone can decode it without a secret key; it does not protect passwords or confidential data. Standard padded Base64 uses 4 characters per 3 input bytes, rounded up, before any line breaks.
How to encode and decode text
Paste text and click Encode, or paste Base64 and click Decode. Choose the alphabet that matches your source. Copy transfers the displayed result. Swap exchanges the fields without converting them; Clear empties both fields without clearing the system clipboard.
UTF-8 examples: Hello → SGVsbG8=; 你好 → 5L2g5aW9.
Standard Base64 and Base64url
Standard mode uses + and / and emits = padding. URL-safe mode uses - and _ and omits padding when encoding. Decoding accepts correctly padded or unpadded input in the selected alphabet, ignores spaces, tabs, CR, LF and form feeds, and rejects malformed padding or nonzero unused pad bits. Mixed alphabets are rejected.
What does 76-character wrapping do?
Wrapping affects encoded output only and inserts a newline every 76 characters. It does not add MIME headers or PEM boundaries. PEM-style certificate encodings commonly require 64-character lines, so this option is not a PEM exporter. Leave wrapping off when an API expects a single line.
Why can valid Base64 fail to decode as text?
Valid Base64 can contain binary bytes that are not valid UTF-8. This text tool reports that separately instead of inserting replacement characters. A leading UTF-8 BOM is preserved, and unpaired Unicode surrogates are rejected when encoding. Browser textareas can normalize line endings; use a file-oriented tool for byte-exact file conversion.
Input size and browser-side processing
Each operation accepts at most 1,048,576 UTF-16 code units, including Base64 whitespace; an emoji often uses two units. Encoding processes bytes in chunks to avoid argument-limit errors. Conversion runs in this page without submitting text to a server or saving it in browser storage. Shared site scripts still load, so this is not an offline or isolated environment guarantee.