Base64 Encoder & Decoder
Encode text to Base64 or decode Base64 back to plain text — instantly, in your browser. Supports standard and URL-safe alphabets.
Plain text
0 chars
Base64 Encoded
Type or paste text above and click Encode.
Tip: press ⌘ + ↵ to run instantly.
How to use the Base64 Encoder & Decoder
- Select Encode or Decode mode using the toggle above.
- Paste your text (or Base64 string) into the input area.
- Click the action button or press ⌘ ↵ to process.
- Use URL-safe mode if the output will be used in a URL, filename, or JWT.
- Click Swap to move the output back to input and flip the mode — useful for round-trip testing.
Common use cases
- Basic Auth headers. Encode
username:passwordto build theAuthorization: Basic …header for HTTP requests. - Data URLs. Embed small images or fonts directly in HTML/CSS as
data:image/png;base64,…to avoid extra HTTP requests. - JWT inspection. Decode the header and payload segments of a JSON Web Token to read claims without a library.
- Email attachments. MIME encodes binary attachments as Base64 to transport them safely through email servers that only handle ASCII.
- API secrets in CI/CD. Store binary secrets as Base64 strings in environment variables and decode them at runtime.
Limitations
- This tool encodes text only. Binary files (images, PDFs) cannot be uploaded here — use a local tool or the browser's FileReader API for those.
- Input is limited to 1 MB to keep the browser responsive.
- Base64 is not encryption. Anyone with the encoded string can decode it instantly. Never use it to hide sensitive data.
Frequently asked questions
What is Base64 encoding?
Base64 is an encoding scheme that converts binary data (or text) into a string of ASCII characters using 64 printable symbols (A–Z, a–z, 0–9, +, /). It is not encryption — it is just a way to safely transmit data in contexts that only support text, such as email bodies or data URLs.
Is my data sent to a server?
No. Encoding and decoding happen entirely in your browser using the built-in JavaScript APIs. Nothing is transmitted to any server.
When should I use Base64?
Common use cases include embedding images in HTML/CSS as data URLs, encoding binary payloads in JSON or XML, Basic Auth headers (username:password), JWT tokens, and passing binary data through systems that only support ASCII.
What is the difference between standard and URL-safe Base64?
Standard Base64 uses + and / which have special meaning in URLs. URL-safe Base64 replaces + with - and / with _ so the result can be used in URLs and filenames without percent-encoding.
Why does Base64 output end with = signs?
Base64 works in 3-byte groups. If the input length is not a multiple of 3, padding characters (=) are appended to make the output length a multiple of 4. One = means 1 byte of padding; == means 2 bytes.
Related tools
Tip Calculator Diff Checker Word Counter JSON Formatter Hex to RGB Password Generator Aspect Ratio Calculator UUID Generator Unix Timestamp Converter URL Encoder / Decoder Lorem Ipsum Generator BMI Calculator Markdown Previewer Color Contrast Checker Random Number Generator Percentage Calculator Fantasy Name Generator Age Calculator Salary to Hourly Calculator Online Stopwatch Tuner Rhythm Trainer Online Metronome