Base64 Encoder and Decoder
Base64 is a way of writing data using only letters, numbers and a few symbols, so it can travel safely through systems that handle text, such as emails, URLs and JSON. Developers meet it in API tokens, data URLs and configuration files.
Last reviewed:
Paste text to encode it, or paste Base64 to decode it. The conversion happens in your browser, so your text is not uploaded. Unicode text, including Hindi and other Indian languages, is handled correctly.
How to use this calculator
- Choose Encode or Decode.
- Type or paste your input.
- For encoding, tick URL-safe output if the result will go in a URL.
- Copy the result.
Formula and variables
Every 3 bytes of input → 4 Base64 characters (6 bits each)
- Alphabet - A–Z, a–z, 0–9, + and /. The URL-safe form uses - and _ instead of + and /.
- Padding - = signs added at the end so the length is a multiple of 4.
Base64 is encoding, not encryption. Anyone can decode it, so never use it to hide secrets.
Worked example
Encode the text “Hello, World!” to Base64.
| Input | Hello, World! |
|---|---|
| Base64 | SGVsbG8sIFdvcmxkIQ== |
- The text is converted to bytes using UTF-8.
- Every three bytes become four Base64 characters.
- Padding with = completes the final group.
What changes the result
- Character encoding. This tool uses UTF-8, which covers all languages and symbols.
- URL-safe form. Standard Base64 contains + and /, which have special meanings in URLs.
- Size. Base64 output is about one third larger than the input.
Benefits and practical uses
- Encode and decode with one click.
- Handles Unicode and emoji.
- Private: conversion happens in your browser.
Assumptions and limitations
- Text is treated as UTF-8.
- Files and images are not supported, only text.
- Decoded data that is not valid UTF-8 text cannot be shown.
Frequently asked questions
What is Base64?
A way to represent bytes as plain text using 64 safe characters.
Is Base64 encryption?
No. It is easily reversed, so it offers no secrecy.
What is URL-safe Base64?
A variant that uses - and _ instead of + and /, and often drops the = padding, so it can be used in URLs.
Why does decoding fail?
The input may have characters outside the Base64 alphabet, a wrong length, or may decode to binary data instead of text.
Is my text sent anywhere?
No. Everything runs in your browser.
References
Page last reviewed on . This calculator gives estimates for planning only; it is not financial advice and not an offer from any lender.