Skip to content
Back to tools

Base64 File & Text Encoder/Decoder - Online Converter

Convert files (images, PDFs, fonts) or text to Base64 strings and decode them back. Zero server uploads, 100% private in-browser tool.

Paste or type to begin.

An advanced, privacy-first utility to handle all your Base64 encoding and decoding needs. Easily drag and drop physical local files like PNGs, SVGs, JPEGs, PDFs, fonts, or audios to encode them into pure Base64 or standardized Data URIs. It generates convenient, ready-to-use HTML <img> tags, CSS background-image snippet styles, and Markdown link codes. On the decoder side, it accepts any Base64 strings or Data URIs, automatically parses MIME types based on magic binary signatures, shows rich media previews, and lets you download the decoded content back into real physical files. Standard UTF-8 plain text encoding/decoding is also fully supported in separate tabs.

How to use

  1. 1

    Select mode and file

    Switch between File Mode and Text Mode. In File Mode, simply drag and drop your target file or click inside the upload box to browse.

  2. 2

    Inspect output snippets

    For file encodings, choose from Raw Base64, Data URI, HTML tag, CSS class, or Markdown formats, and click Copy.

  3. 3

    Decode back to physical files

    To decode, paste your Base64 text/URI into the Decoder box, preview the recognized media, and click 'Download Decoded File'.

  4. 4

    Encode/decode plain text

    Switch to Text Mode to instantly convert between normal strings (UTF-8 safe) and Base64.

FAQ

Q.Is it safe to drop sensitive files into this tool?

Yes, 100% secure. All processing runs locally inside your browser using HTML5 FileReader. No files are uploaded to our servers or stored anywhere, keeping your data entirely confidential.

Q.What is the maximum file size supported?

We recommend files up to 10MB to maintain fluid browser performance. Larger files can be processed, but converting very large assets (like full-length movies) might temporarily freeze the browser tab.

Q.How does the decoder recognize file types from raw Base64?

Our decoder reads the first few bytes (the binary magic number signature) of the decoded stream. It matches headers like PNG, JPEG, GIF, PDF, or ZIP to instantly determine the correct file type and extension, even without a Data URI header.

Q.What is the difference between Raw Base64 and Data URI?

Raw Base64 is just the plain encoded text representation of the file. A Data URI prefixes this text with metadata (e.g. 'data:image/png;base64,...'), allowing browsers to recognize and render it directly inside HTML src tags or CSS stylesheets.

Q.Does this tool support audio and video previews?

Yes. If you decode a valid Base64 string representing an audio (like MP3, WAV) or video (like MP4, WebM) format, our preview panel will dynamically instantiate HTML5 audio or video players so you can play it immediately.

Related tools