Convert text to Base64 or decode Base64 back to UTF-8 text instantly in your browser, with validation and lengths shown — free, private, and runs entirely in your browser.

Base64 Encode/Decode

Encode text to Base64 or decode it back — UTF-8 safe, validated, and done entirely in your browser.

Free to use UTF-8 safe Validates bad Base64 Nothing leaves your browser

Enter your values

Fill in the fields below — the result appears with every step shown.

Shown on the printed, PDF and PNG copies of your result. Leave blank to stay anonymous.

Enter a valid value for text or base64 input.

Enter a valid value for operation.

Local browser calculation

Review your inputs and the tool’s supported scope before using the result.

Calculator loading… If this message stays, this view is not running the calculator's script — open this file in a full browser tab, then press Calculate.

Your result will appear here

Enter your values above, then press Calculate — or press Enter in any field.
TinyExe Base64 Encode/Decode tinyexe.comFree online calculators

TinyExe · Base64 Encode/Decode Result

Calculated locally in your browser

Calculated on
—

–
—

Name

—

Text or Base64 input

—

Operation

—

Result

—

How this was calculated

    What to do next

      TinyExe · tinyexe.com — Runs 100% in your browser — your numbers never leave this tab; nothing is uploaded or stored.

      TinyExe PDF & PNG exports carry the TinyExe logo and tinyexe.com header & footer.

      Runs 100% in your browser — your numbers never leave this tab; nothing is uploaded or stored.

      Embed this tool

      Add this Base64 Encode/Decode to your own page — copy the code below and paste it where you want the tool to appear.

      The embed loads the live calculator in a frame, so it stays up to date automatically. Choose a width, check the code, then copy it. When you publish on WordPress, keep the src pointing at your live tool URL.

      Works in WordPress (Custom HTML block), HTML pages, and most site builders.

      The short answer

      Base64 encoding converts every three bytes of data into four characters from a 64-character alphabet, adding about 33 percent length plus equals-sign padding. For example, the text Hello encodes to SGVsbG8=, which is eight characters. Decoding reverses the process exactly, because Base64 is an encoding, not encryption.

      • Hello → SGVsbG8=
      • Output length = 4 x ceil(bytes/3)
      • Base64 is reversible by anyone — it is not encryption

      Base64 size overhead

      Reference values for this calculator.

      Input bytesBase64 charactersOverhead
      3433%
      304033%
      30040033%
      10 bytes (not multiple of 3)16 (with padding)60% on the last partial group

      The formula

      The exact formula this calculator uses — every variable in it is explained in the card below.

      The formula

      Base64: every 3 input bytes (24 bits) become 4 Base64 characters (4 x 6 bits) from the alphabet A-Z a-z 0-9 + /, padded with = to a multiple of 4; output length = 4 x ceil(input bytes / 3)

      Base64 exists to carry binary data through text-only channels (email, URLs, JSON). It is an encoding, not encryption — anyone can decode it. This implementation is UTF-8 safe: text is first encoded as UTF-8 bytes, so accented and non-Latin characters round-trip correctly, and the decoder validates the alphabet and padding before decoding instead of silently producing garbage.

      Worked examples

      Worked examples with the full working shown — try them in the calculator to check.

      Example 1

      Encoding "Hello"

      Text: Hello, mode: Encode

      CalculationSteps
      Hello is 5 UTF-8 bytes: Hel (3 bytes) becomes SGVs, lo (2 bytes) becomes bG8 and one = pad is added.SGVsbG8= — 8 characters out for 5 characters in.

      Result

      Example 2

      Decoding back

      Text: SGVsbG8=, mode: Decode

      CalculationSteps
      The string is valid Base64 (length 8, one pad). Reversing the alphabet mapping byte by byte returns the original UTF-8 bytes.Hello — 5 characters, an exact round trip.

      Result

      Example 3

      A longer word

      Text: TinyEngine, mode: Encode

      CalculationSteps
      10 bytes = three full groups of 3 plus 1 leftover byte: 4 x ceil(10/3) = 16 characters including == padding.VGlueUVuZ2luZQ== — 16 characters.

      Result

      How to use this calculator

      Step 1

      Paste or type the text you want to encode, or the Base64 string you want to decode.

      Step 2

      Choose Encode or Decode.

      Step 3

      Press Calculate to see the full output and its length.

      Step 4

      Copy the output from the detail card.

      In short: Base64 (RFC 4648) is a binary-to-text encoding that represents data using 64 printable ASCII characters plus = padding.

      Frequently asked questions

      Is Base64 encryption?

      No. Base64 is a reversible encoding with no key — anyone can decode it instantly. Never use it to hide passwords or secrets; use real encryption for that.

      Why is Base64 output longer than the input?

      Every 3 bytes become 4 characters, a fixed 33% overhead, plus up to two = padding characters when the input length is not a multiple of 3.

      What does the = at the end mean?

      Padding. Base64 output length must be a multiple of 4; one or two = signs fill the final group when the input ends with 1 or 2 leftover bytes.

      Why did my decoded text come out garbled elsewhere?

      Usually because the other tool treated the bytes as Latin-1 instead of UTF-8. This tool encodes text to UTF-8 bytes first, so characters like é or 你好 round-trip correctly.

      What is the difference between Base64 and base 10 or base 64 numbers?

      Different things: search terms like "base 64 to base 10" mix them up. Base64 here is the RFC 4648 text encoding; converting numbers between bases is a numeral-system conversion, not what this tool does.

      About this calculator

      The Base64 Encode/Decode tool converts text into Base64 — the encoding used to embed binary data in email, JSON, data URIs and web tokens — and converts Base64 strings back into readable text. It validates input, handles UTF-8 properly, and reports the input and output lengths.

      Computers store bytes (values 0-255), but many channels only safely carry printable text. Base64 solves this by regrouping the byte stream into 6-bit chunks — 64 possible values — and printing each chunk as one safe character: A-Z, a-z, 0-9, plus + and /. Three bytes (24 bits) become exactly four 6-bit characters, which is why output grows by a third.

      When the input does not divide by 3, the final partial group is padded with = signs so the output length is always a multiple of 4 and decoders know where the data ends. One leftover byte produces two characters plus ==; two leftover bytes produce three characters plus =.

      A key honesty point: Base64 provides zero secrecy. It is an encoding like Morse code — a standard, keyless, instantly reversible representation. Obfuscated is not encrypted, and security designs that treat Base64 as protection are a well-known vulnerability pattern.

      Use it when debugging API payloads and JWT fragments, embedding small assets as data URIs, checking encoded values in config files or emails, and learning how binary-to-text encoding works.

      How to calculate it yourself

      Step 1

      Take the input bytes three at a time (24 bits).

      Step 2

      Split the 24 bits into four 6-bit groups.

      Step 3

      Map each 6-bit value (0-63) to the Base64 alphabet: 0-25 = A-Z, 26-51 = a-z, 52-61 = 0-9, 62 = +, 63 = /.

      Step 4

      If the last group has only 1 or 2 bytes, pad the output with == or = to a multiple of 4 characters.

      Step 5

      To decode, reverse the mapping and drop the padding.

      Real-life examples

      Debugging an API token fragment

      A developer receives a token segment "eyJhbGciOi" in a log and wants to confirm it is a JSON header before escalating a bug.

      Decoding eyJhbGciOiJIUzI1NiJ9 gives {"alg":"HS256"} — 13 visible characters of JSON from 20 Base64 characters (with padding rules applied).

      The fragment is confirmed as a standard JWT header, so the bug hunt moves to the signature segment instead.

      Embedding a tiny icon in CSS

      A front-end developer inlines a 300-byte SVG icon as a data URI so it loads without an extra HTTP request.

      300 bytes encode to 4 x (300/3) = 400 Base64 characters exactly, since 300 divides by 3 with no padding needed.

      The CSS gains 400 characters of Base64 and saves one network round trip.

      Ideas & use cases

      • Round-trip test your own data: encode a string here, then decode it — any tool in your pipeline that mangles UTF-8 will show up as a mismatch.
      • Estimate payload growth before choosing Base64: multiply your binary size by 4/3 to see the wire cost, which matters for email attachment limits.
      • Decode suspicious config values to see what a system is really storing — remembering that anything Base64-only is effectively plaintext.

      Limitations & sources

      • Text/UTF-8 only: it does not encode uploaded files or images, and output is shown truncated in the detail card past 120 characters (the length figure stays exact). URL-safe Base64 (- and _ alphabet) is not offered.

      Sources: RFC 4648, The Base16, Base32, and Base64 Data Encodings (IETF, 2006) — alphabet, padding and length rules

      Base64 Encode/Decode · TinyExe calculator suite Free to use · No sign-up · Instant results