What it does
Base64 writes any data with 64 characters (A–Z, a–z, 0–9, + and /) so it can pass through systems built for plain text: email attachments, data URLs, JSON fields, HTTP headers and configuration files. This tool works with text:
- Encode turns your text into Base64. Each character is first stored as UTF-8 bytes, so accents, other scripts and emoji come back exactly as they were.
- Decode turns Base64 back into text. It reads standard and URL-safe Base64, with or without = padding, split over several lines, and with a leading data URL header such as
data:text/plain;base64,.
How to use it
- Choose Encode or Decode, then paste or type into “Your text”. Select “Try a sample” to see an example.
- The result appears next to your text and updates as you type.
- Select Swap to move the result into “Your text” and switch between Encode and Decode, for example to check that an encoded value decodes back to your text.
- Select Copy to put the result on your clipboard.
Options
- URL-safe (base64url) encodes with - and _ instead of + and /, and without = padding, for values that go into a URL, a file name or a token. Decoding reads both variants, so this option only changes encoding.
- The tool remembers the mode and the option you chose on this device.
Good to know
- If the input isn’t valid Base64, the tool shows the line and column of the first character that doesn’t belong, counted from the start of what you pasted.
- Only text can be shown. A value that decodes to an image or another file is reported as binary data instead of being shown as garbled characters.
- Spaces and line breaks in Base64 are ignored, so values wrapped at 64 or 76 characters per line decode as one.
- The character counts under each box show how much longer Base64 is: about 4 characters for every 3 bytes of text.
- The limit is 1,000,000 characters at a time.
Privacy
Your text is processed on your device: encoding and decoding run in your browser, and nothing you type or paste is uploaded.