What Base64 encoding actually does
Base64 represents binary bytes using a limited alphabet of letters, numbers, plus, slash, and optional equals-sign padding. It is useful when data must travel through a text-only field, such as a JSON property, an email body, a configuration value, or a data URL. Encoding changes the representation; decoding reverses it when the original bytes are available.
Base64 is not encryption, hashing, compression, or anonymization. Anyone who sees the encoded value can decode it without a password. In fact, the encoded output is usually about one third larger than the original byte sequence. Use it for compatibility and transport, not to protect credentials or confidential content.
How to encode text
- Select Encode and enter or paste the source text.
- Keep spaces, line breaks, and punctuation exactly as they should be preserved.
- Run the conversion and copy the Base64 output.
- Decode a sample if another system will depend on byte-for-byte accuracy.
Text must first become bytes. This tool uses UTF-8, the standard encoding used across the web, so characters outside basic ASCII may occupy several bytes. That is why a Base64 value created by a legacy Latin-1 system can decode differently even though both strings look structurally valid.
How to decode Base64
- Select Decode and paste the complete Base64 value.
- Remove a surrounding label such as
data:text/plain;base64,if you only need the payload. - Run the conversion and review the resulting UTF-8 text.
- If decoding fails, check for a truncated string, invalid characters, or the URL-safe alphabet.
Standard Base64 commonly uses plus and slash. The URL-safe variant substitutes hyphen and underscore so values fit more safely in URLs and filenames, and it may omit equals-sign padding. Convert those characters or choose a URL-safe-aware decoder when input comes from a JWT, web token, or filename.
Useful cases and important limits
Embedding small values
Base64 is convenient for small inline assets, test fixtures, API examples, and data that must remain inside a text document. It can represent any bytes, but this text-focused converter displays decoded output as UTF-8. Arbitrary image, archive, or executable data may render as replacement characters and should be handled with a file-aware encoder instead.
Diagnosing integrations
Developers often use a converter to inspect a Basic Authentication credential during local debugging, verify an API sample, or compare serialization across languages. Do not paste a live password, private key, session token, or production authorization header into any web tool. Reproduce the structure with disposable test values.
Avoiding double encoding
A Base64 string can itself be encoded again, producing valid but unexpected output. If one decode yields another long string made almost entirely from the Base64 alphabet, check whether an upstream system encoded the value twice. Agree on where encoding happens and document the expected character encoding at each boundary.
Line breaks, padding, and data URLs
Some email-era formats wrap Base64 across fixed-width lines, while JSON and most API fields expect one uninterrupted string. Whitespace may be ignored by a tolerant decoder but rejected by a strict one. Preserve or remove wrapping according to the receiving specification instead of assuming either form works everywhere.
A browser data URL combines a media type and Base64 payload, for example an image prefix followed by encoded bytes. The prefix is metadata and must not be decoded as part of the payload. Large inline assets make HTML or CSS harder to cache and inspect, so reserve data URLs for small resources with a measured benefit.
Privacy
The text conversion runs locally in your browser. Your input and output do not need to be uploaded to PagesTools for encoding or decoding. Data you later paste into another application is governed by that application's handling. Close the page or clear the fields on a shared device, and remember that clipboard managers and browser extensions may retain copied values independently of this tool.