What is this tool?
Use this Base64 encoder and decoder to convert text into Base64, decode Base64 back to readable UTF-8 text, or encode a selected file as a Base64 string. The file option is available in encode mode, so it is useful when you need a quick data URI or a byte-safe text representation for a small asset.
Base64 represents binary bytes with ASCII characters. It is commonly used when data needs to be embedded in JSON, HTML, CSS, email payloads, or another format that expects text. It increases the size of the original data, but it can be convenient for examples, fixtures, and small inline resources.
Common use cases
Encoding text for a payload
Convert a small text value before placing it into a configuration file, API example, test fixture, or documentation snippet where plain UTF-8 text may be inconvenient.
Decoding a Base64 string
Paste an access token segment, fixture value, or copied Base64 blob to check the readable UTF-8 text it represents. If the decoded bytes are not valid UTF-8, the tool shows an error instead of unreadable output.
Creating a data URI
When encoding a file, enable Include data URI prefix to keep the data:...;base64, prefix in the output. This is helpful for small inline images, SVGs, or CSS examples.
How to Use
- Choose Encode or Decode.
- For text, keep Text selected and paste into the input area.
- For file encoding, choose File and select or drop a file.
- Turn on Include data URI prefix only if you need a Data URI output.
- Use Copy to copy the result.
Notes / Limitations
Base64 is not encryption. Anyone who has the Base64 text can decode it.
- Decode mode expects Base64 text and returns UTF-8 text.
- If decoded bytes are not valid UTF-8, the tool shows an error instead of unreadable output.
- Whitespace in pasted Base64 text is removed before decoding.
- File input is encode-only; to decode, paste Base64 text into the text input.
- Very large files can be slow or memory-heavy because the browser must read and encode the whole file.
Privacy / local processing
Text conversion and file reading run in the browser with JavaScript and the FileReader API. The Base64 tool code does not upload the selected file or pasted text.
Related tools
- Use the URL Encoder / Decoder when you need percent encoding for query parameters instead of Base64.
- Use the JSON Formatter & Validator to inspect JSON payloads that contain Base64 values.