Base64 Encoder & Decoder
Encode text or images to Base64, or decode Base64 back to string.
Base64 encoder and decoder
Base64 turns text or file data into a plain text string. It is often used when data needs to fit inside JSON, HTML, CSS, email, or an API field.
You can paste normal text to encode it, paste Base64 to decode it, or upload an image and get a data URL.
Base64 images
Small images can be placed directly in HTML, CSS, or JSON as Base64. This can be useful for icons, email templates, and quick demos.
Good for
- Small icons
- Data URLs for demos
- Email and API examples
Not great for
- Large images
- Images that need browser caching
- Files that people need to edit by hand
Notes
- Base64 output can become much larger than the original file
- Data URLs are convenient for examples, but awkward for large assets
How to use Base64 Encoder & Decoder
Use the Base64 tool to encode text or decode Base64 strings. It is useful for small data snippets, test values, and understanding encoded API fields.
Developers often use this page when they need base64 decoder, base64 encode, base64 decode, and base64 encoder.
Privacy and data handling
This encoder and decoder works in the browser for normal text and file checks.
- Base64 is encoding, not encryption, so decoded data may be sensitive.
- Selected files are read with browser APIs for normal use.
- Clear copied output if it contains credentials, keys, or private data.
Examples
Encode plain text
Input
hello worldOutput
aGVsbG8gd29ybGQ=Base64 turns text into a safe ASCII string, but it does not make the text private.
Decode a Basic Auth value
Input
dXNlcjpwYXNzOutput
user:passBasic Auth headers often contain Base64 text. Treat decoded credentials carefully.
Steps
- 1Paste plain text or Base64 text into the input.
- 2Choose encode or decode.
- 3Copy the output and check that the characters look correct.
Common use cases
- Decode a Basic Auth header during debugging.
- Encode small text values for tests.
- Inspect Base64 data found in an API response.
Practical tips
- Base64 is encoding, not encryption.
- Binary files may need careful handling when converted to text.
- Use UTF-8 when you expect non-English characters.
FAQ
Is Base64 secure?
No. Anyone can decode Base64. Do not use it to hide passwords or private data.
Why does Base64 sometimes end with equals signs?
The equals signs are padding. They help make the encoded text length fit the Base64 format.