Skip to content
Calcemitool
Developer Tools

Base64 Encode/Decode

Base64 turns arbitrary text (including UTF-8 characters) into a safe set of letters, numbers and a few symbols so it can travel through systems that only understand plain text, like URLs, JSON or email.

Enter your details

Results update live as you type.

Example: Encode

Example: Hello, world!

Nothing is stored — your inputs stay in the page link so you can share or bookmark this exact result.

Step-by-step calculation

  1. 1

    Convert text to UTF-8 bytes

    each character -> 1-4 bytes = Done

  2. 2

    Group bytes into base64 characters

    3 bytes -> 4 chars = 20 characters

The formula

Base64 = groups of 3 bytes mapped to 4 characters from a 64-symbol alphabet

Each group of three 8-bit bytes (24 bits) is split into four 6-bit chunks, and each chunk is mapped to a character in A-Z, a-z, 0-9, + and /.

Byte
8 bits of the original text, from its UTF-8 representation
Padding (=)
Added when the input length is not a multiple of 3 bytes

Embedding an image in CSS

Developers often Base64-encode small icons so they can be embedded directly in CSS or HTML as a data URL, avoiding an extra network request.

Frequently asked questions

Is Base64 encryption?

No. Base64 is just a text-safe encoding — anyone can decode it instantly, so never use it to hide secrets.

Why does my encoded text end with = signs?

That is padding, added when the input length is not an exact multiple of 3 bytes.

Does Base64 work with emoji and accents?

Yes — this tool converts your text to UTF-8 bytes first, so any Unicode character is supported.

Base64 Output

SGVsbG8sIHdvcmxkIQ==

Encoded 13 characters into a 20-character Base64 string.

Input Length
13
Output Length
20

Headline result: Base64 Output — updates live as you change the inputs.

Browse all calculators →

Complete guide6 min read

Base64: the complete guide

Everything behind the numbers above — what each input means, the formula that produces the result, where the calculation is used, and the mistakes that quietly ruin it.

Why use the Base64

Most people can do this calculation on paper, but doing it repeatedly — and correctly — is where the effort goes. The Base64 is built for software engineers, QA testers and technical writers, and it answers one question well: a correct, reproducible transformation or generated value. Instead of a bare number it shows the inputs it used, the formula it applied and every intermediate step, so you can check the reasoning rather than trust it blindly.

The calculation runs entirely in your browser and updates the moment you change a value. Nothing is uploaded, nothing is stored on a server, and your inputs live in the page address so you can bookmark a scenario or send it to someone else exactly as you left it. That makes it practical to model several versions of the same decision side by side.

How this calculator works

Each group of three 8-bit bytes (24 bits) is split into four 6-bit chunks, and each chunk is mapped to a character in A-Z, a-z, 0-9, + and /. In practice you supply 2 core values, and the calculator resolves the formula and its supporting figures in a single pass.

  1. 1

    Enter your figures

    Fill in direction and input. Each field carries an example so you can see the expected scale of the number.

  2. 2

    The formula is applied

    Your values are substituted into Base64 = groups of 3 bytes mapped to 4 characters from a 64-symbol alphabet and evaluated immediately — there is no submit step and no page reload.

  3. 3

    Results are broken down

    The headline figure appears first, followed by the supporting numbers, any charts or schedules, and the step-by-step arithmetic that produced them.

  4. 4

    Adjust and compare

    Change one input at a time to see its individual effect. The page link updates with your values, so you can keep two scenarios open in separate tabs.

Every input explained

Accurate inputs matter more than the formula itself. Here is what each field means, and what to enter when you are unsure.

  • Direction

    Choose whether you are turning text into Base64, or Base64 back into text. Choose the option that matches your situation — it changes how the result is worked out. Example: Encode

  • Input

    Paste the text (or Base64 string) you want to convert. Multi-line input; formatting and line breaks are preserved. Example: Hello, world!

The formula behind the result

The calculator evaluates Base64 = groups of 3 bytes mapped to 4 characters from a 64-symbol alphabet. Each group of three 8-bit bytes (24 bits) is split into four 6-bit chunks, and each chunk is mapped to a character in A-Z, a-z, 0-9, + and /.

Understanding the terms is what lets you spot an implausible answer before you act on it — if a result surprises you, one of the terms below is usually carrying an input in the wrong unit or scale.

  • Byte

    8 bits of the original text, from its UTF-8 representation

  • Padding (=)

    Added when the input length is not a multiple of 3 bytes

Where people use this

Developer Tools calculations show up in more places than most people expect. These are the situations where the Base64 earns its keep.

  • Inspecting, formatting or transforming data during debugging

  • Generating test fixtures and identifiers safely in the browser

  • Verifying an encoding or hash produced elsewhere in a pipeline

  • Documenting a transformation with a reproducible example

Advantages of calculating it this way

  • The working is visible

    Every intermediate step is shown, so the result can be audited, reproduced by hand, or explained to somebody else who needs convincing.

  • Instant scenario testing

    Because results recalculate as you type, comparing five variations costs the same effort as calculating one.

  • No spreadsheet errors

    The formula is fixed and tested. There is no stray cell reference, no dragged-down range that stopped one row short, and no silent overwrite.

  • Private by construction

    The maths runs in your browser. Nothing you type is transmitted, logged or retained anywhere.

  • Shareable results

    Your inputs live in the page link, so a scenario can be bookmarked, printed or sent to a partner, adviser or colleague unchanged.

Limitations worth knowing

Everything runs client-side in your own browser, which is good for privacy but means results depend on your browser's own implementations.

A calculator models the arithmetic of a decision, not the decision itself. It cannot see your risk tolerance, your circumstances or the small print of a specific agreement — treat the output as one strong input into a judgement you still make yourself.

Common mistakes to avoid

  • Mixing time periods

    Annual rates with monthly amounts, or weekly figures with yearly totals, is the single most common source of a wildly wrong answer. Confirm that every input uses the period the field asks for.

  • Confusing percentages and decimals

    Percentage fields expect 7.5, not 0.075. Entering the decimal form understates the result by a factor of one hundred.

  • Leaving defaults in place

    Default values exist to demonstrate the calculator, not to describe your situation. Replace every one of them before reading the result seriously.

  • Ignoring the optional fields

    Every field here affects the outcome, so an approximate entry produces an approximate answer. Use real figures wherever you have them.

  • Reading one scenario as the answer

    A single calculation is a snapshot. Run an optimistic and a pessimistic version before committing to anything that matters.

Tips for a more accurate result

  • Start from source documents

    Take figures from the statement, contract, payslip or listing rather than from memory. Remembered numbers are almost always rounded in the flattering direction.

  • Change one variable at a time

    Isolating a single input tells you how sensitive the result is to it — which is usually more useful than the result itself.

  • Never paste production secrets into any online tool, includi

    Never paste production secrets into any online tool, including this one — generate and rotate them in your own secure environment.

  • Save the scenarios that matter

    Bookmark or share the page link once a scenario looks right. It restores every input exactly, which makes revisiting a decision months later straightforward.

  • Cross-check anything consequential

    For decisions with real financial, medical or legal weight, confirm the figure with a qualified professional who can see your full circumstances.

Conclusion

The base64 encode/decode turns a fiddly, error-prone calculation into something you can run in seconds and repeat as often as your situation changes. Used properly — real figures, consistent periods, more than one scenario — it gives you a correct, reproducible transformation or generated value with the working laid out in full.

Bookmark this page for the next time the question comes up, or explore the related developer tools calculators below to model the rest of the decision. Everything on Calcemitool is free, requires no account, and works the same way on every device. This page also covers base64 encode, base64 decode and base64 converter.

Popular next steps — each one is free, instant and explains the maths.

Didn't find what you needed?

135+ free calculators across 13 categories — every one shows its formula and working.

Browse all calculators