Text and files to Base64 and back, with URL-safe mode and image preview
Runs in your browser. Nothing you type is sent anywhere. Updated on 25 Oct 2026.Base64 turns binary data into plain text so it can travel inside JSON, HTML or a data URI, at a cost of roughly 33 per cent more size. This converts text and files both ways, with a URL-safe mode and an image preview. Nothing is uploaded.
Choose Encode or Decode on the options bar.
Type or paste text into the left pane; to encode a file, choose File and click Choose a file.
Turn on URL-safe if the value goes into a URL or a JWT.
Click Copy to take the result, or the download icon to save it; decoded binary data downloads as a file.
This Base64 encoder turns text or any file into Base64 and decodes Base64 back into readable text, an image preview or a downloadable file. Output appears as you type, with a URL-safe mode for tokens and query strings and a one-click data URI when you encode an image.
People use it to inline a small logo into CSS or an HTML email, to read the payload of a token or a webhook body that arrived Base64-encoded, and to check what a client actually sent when an API rejects a request. It is also handy for pasting a certificate or a binary blob into a config file that only accepts text.
Encoding and decoding run in your browser with JavaScript. Files are read locally with the File API and never uploaded, so it is fine to use with private documents or keys. Text is treated as UTF-8, which means emoji and Hindi, Tamil or Arabic script round-trip correctly. The decoder accepts either alphabet, tolerates missing padding and line breaks, and spots PNG, JPEG, GIF and WebP output so you can preview it. A file you pick can be up to 20 MB, because the whole Base64 string is built in memory and a bigger one would freeze the tab; pasted text has no limit of its own.
Press Ctrl+Enter to copy the result. For a whole JWT rather than a single segment, use the JWT Decoder; for hashes, see the Hash Generator.
Yes. There is no signup, no watermark and no cap on how often you use it. Pasted text has no length limit beyond what your browser can hold. A file you pick is capped at 20 MB, because the whole Base64 string is built in memory and a larger file would freeze the tab rather than encode.
No. Encoding and decoding run entirely in your browser with JavaScript. Files are read locally with the File API and the result is built in memory, so nothing you paste or pick leaves your device.
Standard Base64 uses + and /, which have special meaning in URLs, and pads with =. URL-safe Base64 (RFC 4648 section 5) replaces them with - and _ and usually drops the padding. It is used in JWTs, OAuth tokens and query strings. Turn on the URL-safe switch to produce it; the decoder detects it automatically.
Choose Encode, switch the input to File, pick the image and turn on Data URI. The output starts with data:image/png;base64, and can be pasted straight into a CSS url() or an img src attribute. Keep inlined images small; anything over a few kilobytes is usually better served as a normal file.
The decoded bytes are not valid UTF-8 text, so they are probably a file such as a PDF, a ZIP or an image. Images are previewed; other binaries show a hex preview and a Download button that saves the bytes with a sensible name.
The input contains a character outside A-Z, a-z, 0-9, + and / (or - and _ for URL-safe), has a stray = in the middle, or is missing a character so the length does not work out. Whitespace and line breaks are fine and are ignored. Check that the string was copied completely.
Still stuck? Ask about Base64 Encode & Decode and anybody who knows can answer. No account needed.
Same job, other tools: Binary to Text Converter – Decode binary code such as 01001000 01101001 into readable text.
On the related tools: JSON to C# for Newtonsoft.Json – Paste JSON and get C# classes with [JsonProperty] attributes for Json.NET · Zod Schema Generator – Write Zod validation schemas from a real API response instead of by hand.
In the collections JSON Tools · Developer Converters.